필터 지우기
필터 지우기

Plot nested loop data

조회 수: 1 (최근 30일)
androidguy
androidguy 2016년 10월 23일
답변: KSSV 2016년 10월 23일
Hello everyone. I have a simple question to ask since I am a bit confused. I have a following dummy code like this -
iter = 1e2;
myvar= zeros(500,iter);
for k = 1:iter
for ii=1:500
%body of my code
myvar(ii, k) = myvar(ii) + det (I_mat + var(ii) * A_mat);
end
end
At the end of code, the variable "myvar" will store all the iterations data in the matrix of size 500x100. So my question is, how can i find the mean of each column of "myvar" matrix and plot this data? Any advice is really appreciated.
Thank you,

채택된 답변

KSSV
KSSV 2016년 10월 23일
M= mean(myvar);
plot(M);
It plots the mean w.r.t indices.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by