Storing information from a loop over 3 variables
이전 댓글 표시
The code below seems to store the results from each loop as opposed to providing the results from the current loop.
So, for example Table(1,1,2) has the results of Table (1,1,1) and Table (1,1,2).
x=xlsread('DeltaNAV.xlsx','Sheet1','O4:O200003');
SCR=prctile(x,0.5);
rho=0;
muinputs=[-0.025,-0.010,0.0181,0.025];
sigmainputs=[0.0125,0.0287,0.0501,0.0751];
Table=cell(4,4,9);
for i=1:4
for j=1:4
for ii=1:9
muy=-muinputs(i)*SCR;
sigmay=-sigmainputs(j)*SCR;
%muy=-0.1*SCR;
%sigmay=-0.1*SCR;
y(:,ii)=Testlooping(x,rho,muy,sigmay);
y2(:,ii)=x+y(:,ii);
y3(:,ii)=prctile(y2(:,ii),0.5);
Table{i,j,ii}=y3;
end
end
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!