Matrix multiplication: Difference between revisions

m
m (→‎{{header|C}}: Syntax hilighting for C)
Line 365:
=={{header|Fortran}}==
In ISO Fortran 90 or later, use the SIZE and MATMUL intrinsic functions:
REALreal, DIMENSIONdimension(Nn,Mm) :: Aa = RESHAPEreshape( (/ (Ii, Ii=1, Nn*Mm) /), (/ Nn, Mm /) )
REALreal, DIMENSIONdimension(Mm,Kk) :: Bb = RESHAPEreshape( (/ (Ii, Ii=1, Mm*Kk) /), (/ Mm, Kk /) )
REALreal, DIMENSIONdimension(SIZEsize(Aa,1), SIZEsize(Bb,2)) :: Cc ! C is an array whose first dimension (row) size is the same
! as A's first dimension size, and whose second dimension
! (column) size is the same as B's second dimension size.
Cc = MATMULmatmul( Aa, Bb )
 
=={{header|Haskell}}==
Anonymous user