The way to get a graph in case of discretized system
Ältere Kommentare anzeigen
Hi guys, I want to get a scatter plot (actually I prefer solid line graph) in the discretized time step system.
Simplified situation is below:
% Initial conditions
t = 0 ;
T = 273 ; % [Kelvin]
dt = 0.2 ; % [time step]
% For loop
for i = 1:100
t = t + dt ;
T = 0.5 + T ;
end
What I want to get is a graph of T(y-axis) profile over the time, t(x-axis). In addition, is there any way to get updated graph after every each for loop calculation is end? (I want to be new data point is overlaid on an existing graph.)
Thanks for reading :D
Akzeptierte Antwort
Weitere Antworten (1)
Steven Lord
am 18 Okt. 2018
0 Stimmen
Use an animatedline. You probably want to determine the final limits of your axes and set them ahead of time using axis so the axes doesn't change limits each time you add a point beyond the boundary of the axes.
1 Kommentar
Jinsu Kim
am 18 Okt. 2018
Kategorien
Mehr zu Discrete Data Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!