- #1
Milentije
- 48
- 0
Well the issue here is that I will have 21 numerical values written into one array,but then goes iterative procedure and get 21 values for model 2.How to write l(m0),l(m1)?I will need these arrays later for calculations.
Milentije said:do i=1,iter
l(nc)=l(nc,iter)
end do
I tried the above but it doesn't work.l is vector dimension 21,every iteration gives me l.I do not know the number of iterations.How to store l for every iteration?
An array in FORTRAN 90 is a data structure that allows you to store multiple values of the same type in a single variable. It is declared using the DIMENSION statement and can be used to efficiently handle large sets of data.
To declare an array in FORTRAN 90, you need to use the DIMENSION statement followed by the name of the array and the number of elements in each dimension. For example, DIMENSION array(10) would declare an array with 10 elements.
A one-dimensional array in FORTRAN 90 is a simple list of elements, while a multi-dimensional array is an array of arrays. This means that a multi-dimensional array can store data in a table-like structure with rows and columns.
In FORTRAN 90, elements in an array are accessed using their index numbers. The first element in a one-dimensional array has an index of 1, while the first element in a multi-dimensional array has an index of (1,1). For example, to access the third element in a one-dimensional array, you would use array(3).
Some common problems that can occur when working with arrays in FORTRAN 90 include out-of-bounds errors, where you try to access an element that does not exist, and errors in array dimensions, where the array is not declared with the correct number of elements. It is important to carefully declare and access arrays in order to avoid these types of errors.