How to create 3d array equivalent to fortran dimension?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
adi kul
am 16 Mai 2016
Beantwortet: Farrukh Mazhar
am 20 Feb. 2019
Hello all, I have this fortran code
dimension x(2,m,n)
where m=100, n=40 Now how to convert this into the matlab?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Farrukh Mazhar
am 20 Feb. 2019
this code probably is wrong the correct Fortran code would be like
do k=1,aa
do i=1,n
do j=1,m
g(j) = t(k,i,j)*dcos(anglezx) - t(j)*dsin(anglezx)
enddo
enddo
enddo
Please change to
for k=1:aa
do i=1:n
do j=1:m
g(k,j,i) = t(k,i,j)*dcos(anglezx) - t(j)*dsin(anglezx)
end
end
end
0 Kommentare
Siehe auch
Kategorien
Mehr zu Fortran with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!