Hi COMM, How can I hold only one plot while updating the rest in a figure ? E.g. I want to keep (x,f) plot fixed , while keeping the current value for the animated plot
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
SSmin=0;
SSmax=19;
x=SSmin:0.01:SSmax;
f= (x).*sin(x) +20;
figure
plot(x,f)
hold on
for k=1:length(x)
plot(x(k),f(k),'or')
axis([SSmin SSmax 0 30])
pause(0.2)
end
0 Commenti
Risposte (1)
VBBV
il 20 Gen 2022
Modificato: VBBV
il 20 Gen 2022
for k=1:length(x)
plot(x(1:k),f(1:k),'or')
axis([SSmin SSmax 0 30])
pause(2)
end
Check with this
Vedere anche
Categorie
Scopri di più su Animation in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!