Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java Homework

Name: Anonymous 2009-10-27 18:58

They want me to multiply a matrix using arrays..
So the matrix is an array of arrays?
I'm a bit confused..

if i say
double[][] matrix;
how do i tell which [] has the rows and which has the columns? or is that for me to define?

Name: Anonymous 2009-10-27 23:35


  double A[10][10], B[10][10], AtimesB[10][10];

  for (i=0; i<10; i++)
  {
     for (j=0; j<10; j++)
         {
        for (k=0; k<10; k++)
                {
             AtimesB[i][j] += A[i][k] * B[k][j];
        }
     }
  }


For my help, all I request is that you write sage in the Email field of all future posts.

Thanks!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List