- #1
tactical
- 6
- 0
Hey, been 6 semesters since I took a fortran class and it's come up again. I'm and engineering major so I don't know what about programming and what not.
Anyways, I need a program that multiplies an NxN matrix by an N dimensional vector. This is what I have so far:
Program Matrix
IMPLICIT NONE
REAL :: N ! Dimension of the NxN matrix
REAL :: RandVal !Random values to generate random matrix
REAL :: MatrixA !The matrix
REAL :: SEED !Used in generating random numbers
CALL SYSTEM_CLOCK(COUNT=SEED)
CALL SRAND(SEED)
RandVal=RAND()
WRITE (*,*) "Please define the size of your NxN Matrix"
READ (*,*) N
LOL, it's not much, but I have never done matrices in fortran before :/. Any insight is greatly appreciated.
Anyways, I need a program that multiplies an NxN matrix by an N dimensional vector. This is what I have so far:
Program Matrix
IMPLICIT NONE
REAL :: N ! Dimension of the NxN matrix
REAL :: RandVal !Random values to generate random matrix
REAL :: MatrixA !The matrix
REAL :: SEED !Used in generating random numbers
CALL SYSTEM_CLOCK(COUNT=SEED)
CALL SRAND(SEED)
RandVal=RAND()
WRITE (*,*) "Please define the size of your NxN Matrix"
READ (*,*) N
LOL, it's not much, but I have never done matrices in fortran before :/. Any insight is greatly appreciated.