I have one for time loop under which a caclulation taking place for a 1d domain (let say 1:n). I want to plot my data against 1d domain for all times.

조회 수: 1 (최근 30일)
for t=0:2:6
for i=1:n
%some calculation
end
% Let say this calculation gave us some value H(1:n) for t=0, t=2,and t=6
H
% I want to plot this H at all i. for all time steps (which will show me variation with time)
end

답변 (1개)

Torsten
Torsten 2022년 11월 4일
for t=0:2:6
for i=1:n
H(1+t/2,i) = something
end
end
plot(1:n,H)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by