Filter löschen
Filter löschen

Unable to suppress columns of plot

1 Ansicht (letzte 30 Tage)
Marco Bakker
Marco Bakker am 27 Okt. 2016
Beantwortet: Walter Roberson am 27 Okt. 2016
idx = find(pos<0.00000001,1);
endTime = t(idx);
plot(t,pos,'--','DisplayName','Verlet solution');
legend('show')
xlim([0 endTime])
ylim([0 height])
Whats wrong with my code that makes all the columns of the plot print? It's driving me crazy, and overheating my CPU!

Antworten (1)

Walter Roberson
Walter Roberson am 27 Okt. 2016
idx = find(pos < 1E-8, 1, 'first');
endTime = t(idx);
plot(t(1:idx), pos(1:idx), '--','DisplayName','Verlet solution');
legend('show')
xlim([0 endTime])
ylim([0 height])

Kategorien

Mehr zu Graphics Objects finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by