Anonymous user
Matrix multiplication: Difference between revisions
→{{header|Fortran}}
Line 262:
=={{header|Fortran}}==
In ISO Fortran 90 or later, use the SIZE and MATMUL intrinsic
REAL, DIMENSION(N,M) :: A = RESHAPE( (/ (I, I=1, N*M) /), (/ N, M /) )
REAL, DIMENSION(M,K) :: B = RESHAPE( (/ (I, I=1, M*K) /), (/ M, K /) )
REAL, DIMENSION(
! as A's first dimension size, and whose second dimension
! (column) size is the same as B's second dimension size.
C = MATMUL( A, B )
|