Need a Fortran Function
Hi, I need a function in Fortran to multiply a matrix by a scalar.Is there any? Thanks

Re: Need a Fortran Function
that is a simple loop. You should be able to do that yourself..:)

Re: Need a Fortran Function
Function multMat(a,Mat,m,n) implicit double precision(ah,oz) DIMENSION Mat(m,n),multMat(m,n) ! DO i=1,m
DO j=1,n multMat(i,j)=a*Mat(i,j) ENDDO ENDDO ! or just multMat=a*Mat ! same as the above routine end function 
Re: Need a Fortran Function
If you don't write an index fortran consider it all. for example: mat = mat*s mat(i,:)=mat(i,:)*s mat(:,j)=mat(:,j)*s

All times are GMT 4. The time now is 01:18. 