question about matrix code
Posted: Sun May 15, 2016 1:47 pm
Hi guys.
I want to make a matrix, but I have some problems. The code is as follows:
!imax = 5
matrix(!imax,!imax) amat = 0
for !i=1 to !imax
amat(!i,!i) = !i
next
!imax = 5
matrix(!imax,!imax) amat = 0
for !i=1 to !imax step = 2
amat(!i,!i) = !i
next
Soon the second line appears the error "!IMAX is not defined.", but I set in the previous line...
Thanks for the help!
I want to make a matrix, but I have some problems. The code is as follows:
!imax = 5
matrix(!imax,!imax) amat = 0
for !i=1 to !imax
amat(!i,!i) = !i
next
!imax = 5
matrix(!imax,!imax) amat = 0
for !i=1 to !imax step = 2
amat(!i,!i) = !i
next
Soon the second line appears the error "!IMAX is not defined.", but I set in the previous line...
Thanks for the help!