Thread: Matrices

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    8

    Matrices

    /code/
    double A[5][5];
    int columnsA = 3;
    int rowsA = 3;

    void setmatrix(double MA[5][5])
    {
    int i;
    int j;

    printf("please enter matrix %f: \n");
    for(i=o; i<=row; i++)
    {
    for(j=0; j<=column; j++)
    {
    printf("Row %d, Column %d: ", i+1, j+1);
    scanf("%lf ", &A[i][j]);
    }
    }
    /code/

    this is before int main(void)

    I want to display matrix A [1,0,0]
    [0,1,0]
    [0,0,1]
    this is the default matrix (displaymatrix())

    how would I add and mulitply matrix A and a MatrixB (entered by user)

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    This seems familiar in some sort of Twilight Zone way. But anyway:
    http://en.wikipedia.org/wiki/Matrix_...lying_matrices

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C simple Matrices
    By Cyberman86 in forum C Programming
    Replies: 3
    Last Post: 05-07-2009, 05:20 PM
  2. Help getting started..matrices
    By BobDole11 in forum C Programming
    Replies: 7
    Last Post: 11-15-2008, 09:51 PM
  3. adding matrices, help with switches
    By quiet_forever in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2007, 08:21 AM
  4. Comparing Matrices (D3D9)
    By MicroFiend in forum Game Programming
    Replies: 2
    Last Post: 10-12-2005, 08:36 AM
  5. Problem multiplying rotation matrices together
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 03-04-2003, 09:20 AM