필터 지우기
필터 지우기

How do I get data from each step in a loop?

조회 수: 2 (최근 30일)
Andre
Andre 2013년 4월 18일
Hello.
I want my array resu to save all date for each n=1,2,3... in row n, and start the same procedure for next n. So in the first row in resu i want to have an array when n=1 while looping m and j. Second row scould be an array when n=2 while looping m and j. And so on, all the way until n=N.
Any suggestions what iam doing wrong?
My code:
resu = zeros([N,length(t)]);
u=zeros(size(t));
for n=1:N
for m=1:N
for j=1:Q
Omega=omegaakse(j);
u=u+abs(Gu(n,m,j))*sqrt(2*domega)*cos(Omega.*t+2*pi*rand);
end
end
resu(n,:) = u;
end
where t i a time vector.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by