store end values of an array in a nexted loop
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
i have this code below. I do 20 simulations and load them. For every simulation the RRE is 1x5000 (preallocated size). But i only need end values. so i pick them with RRE_MU_R1(end);I want to find the mean of all the end values from the 20 simulations and store them in an array. And all this needs to be repeated for every value of MV.
for MV = .1:.1:.2
for i=1:20
load( ['output/MU_R_',mat_size,'_',int2str(100*MV),'_',int2str(i),'.mat'], 'RRE_MU_R') //load data
RRE_MU_R1=nonzeros(RRE_MU_R); //remove zeros
rRE_MU_R(i) =RRE_MU_R1(end);
end
end
Respuestas (1)
madhan ravi
el 22 de Oct. de 2018
After the loops:
mean(rRE_MU_R)
3 comentarios
fadams18
el 22 de Oct. de 2018
madhan ravi
el 22 de Oct. de 2018
size(rRE_MU_R)?
fadams18
el 22 de Oct. de 2018
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!