Multidimensional matrices from Fortran to Matlab
Show older comments
I am translating a code from Fortran to Matlab and have been stuck on how to deal with multidimensional arrays. Specifically,
Array's A dimensions are 20x20x400x5x4x65
In the Fortran code there is a division which I don't understand as follows:
sum(A(:,:,:,:,:,1))/sum(A(:,:,:,:,:,2)
In Matlab this would not work. Matlab would add each column of 2 dimensional matrices for every single page along the other dimensions (so A(:,:,1,1,1,1) would be one case).
I would greatly appreciate it if there is anyone familiar with Fortran to explain what the line above means and how it can be converted to Matlab. I read a lot of Fortran guides before coming here but I am really stuck on this one.
Accepted Answer
More Answers (0)
Categories
Find more on Fortran with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!