Hello, my problem is basically that I don't know how to store and pass all 8736 different values from L(k) to the outside of nested for loops in a form of an array (8736×1), so I can use it for further processing and comparing with some other arrays in my code. Code is below…
Lw =[52x1]; Ld=[7x1]; Lh=[24x6]; Ly=number; for i=1:length(Lw) for j=1:length(Ld) for k=1:length(Lh) if ((i>=1 && i<=8)||(i>=44 && i<=52)) if (j>=1 && j<=5) L(k)=Lw(i)*Ld(j)*Lh(k,1)*Ly; else L(k)=Lw(i)*Ld(j)*Lh(k,2)*Ly; end end if (i>=18 && i<=30) if (j>=1 && j<=5) L(k)=Lw(i)*Ld(j)*Lh(k,3)*Ly; else L(k)=Lw(i)*Ld(j)*Lh(k,4)*Ly; end end if (i>=9 && i<=17)||(i>=31 && i<=43) if (j>=1 && j<=5) L(k)=Lw(i)*Ld(j)*Lh(k,5)*Ly; else L(k)=Lw(i)*Ld(j)*Lh(k,6)*Ly; end end L(k) end end end L to be passed here with all 8736 values
Thank you in advance.
Best Answer