I have found it out myself:
you can do it with when you use a parameter of the sum-function:
sum(Iwe,dim=3)
and then use a vector in Iwe to index it for c
Hi,
I want to convert MATLAB to Fortran code and have problems replacing a for-loop, which uses a vector as looping variable.
The MATLAB code looks like this:
for m = 1:ind_Dw
for c = [1 3 4 7 10 12 14 19 22 24 27]
Iw(:,:) = Iw(:,:) + pi*IWE(:,:,c,m)*Dw(m)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.