This is my actual code:
Lr = linspace(100,300,10);
vi = linspace(10,30,10);
vf = linspace(10,30,10);
b = linspace(0.5,1.2,10);
h = linspace(0.3,0.8,10);
Rc = [1000, 1500, 2000, 2500, 3000, 3500;
29, 22.4, 17.3, 13.4, 10.4, 8];
rti = randi(5, 10, 1, 10, 10, 10, 10);
for kk = 1:rows(Lr)
for jj = 1:length(vi)
for ll = 1:length(vf)
for mm = 1:length(b)
for nn = 1:length(h)
ratt(kk,1,jj,ll,mm,nn) = Rc(2,rti(kk,1,jj,ll,mm,nn));
endfor
endfor
endfor
endfor
endfor
In this example, all the vectors are of length 10, but in the real code, they can be from 1 to 100. How can I remove all these loops?