SoloCodigo

Programación General => C/C++ => Mensaje iniciado por: morrison9 en Miércoles 5 de Diciembre de 2012, 08:52

Título: Loop para matrices
Publicado por: morrison9 en Miércoles 5 de Diciembre de 2012, 08:52
Hola, estoy creando un programa para hacer una matriz de adjuntos o cofactores, pero cuando creo las operaciones para la matriz de cofactores no consigo encontrar un loop para hacerlo, si alguien sabe se lo agradeceria:
EL loop para M[][] se hacerlo pero no el de las operaciones  :ayuda:
                                                         M[0][0]= matrix1[1][1] * matrix1[2][2] - matrix1[1][2] * matrix1[2][1];
                                                         M[0][1]= matrix1[1][0] * matrix1[2][2] - matrix1[1][2] * matrix1[2][0];
                                                         M[0][2]= matrix1[1][0] * matrix1[2][1] - matrix1[1][1] * matrix1[2][0];
                                                         M[1][0]= matrix1[0][1] * matrix1[2][2] - matrix1[0][2] * matrix1[2][1];
                                                         M[1][1]= matrix1[0][0] * matrix1[2][2] - matrix1[0][2] * matrix1[2][0];
                                                         M[1][2]= matrix1[0][0] * matrix1[2][1] - matrix1[0][1] * matrix1[2][0];
                                                         M[2][0]= matrix1[0][1] * matrix1[1][2] - matrix1[0][2] * matrix1[1][1];
                                                         M[2][1]= matrix1[0][0] * matrix1[1][2] - matrix1[0][2] * matrix1[1][0];
                                                         M[2][2]= matrix1[0][0] * matrix1[1][1] - matrix1[0][1] * matrix1[1][0];
Título: Re:Loop para matrices
Publicado por: morrison9 en Miércoles 5 de Diciembre de 2012, 10:31
                                                         M[0][0]= matrix1[1][1] * matrix1[2][2] - matrix1[1][2] * matrix1[2][1];
                                                         M[0][1]= matrix1[1][0] * matrix1[2][2] - matrix1[1][2] * matrix1[2][0];
                                                         M[0][2]= matrix1[1][0] * matrix1[2][1] - matrix1[1][1] * matrix1[2][0];
                                                         M[1][0]= matrix1[0][1] * matrix1[2][2] - matrix1[0][2] * matrix1[2][1];
                                                         M[1][1]= matrix1[0][0] * matrix1[2][2] - matrix1[0][2] * matrix1[2][0];
                                                         M[1][2]= matrix1[0][0] * matrix1[2][1] - matrix1[0][1] * matrix1[2][0];
                                                         M[2][0]= matrix1[0][1] * matrix1[1][2] - matrix1[0][2] * matrix1[1][1];
                                                         M[2][1]= matrix1[0][0] * matrix1[1][2] - matrix1[0][2] * matrix1[1][0];
                                                         M[2][2]= matrix1[0][0] * matrix1[1][1] - matrix1[0][1] * matrix1[1][0];