Unable to suppress columns of plot

조회 수: 1 (최근 30일)
Marco Bakker
Marco Bakker 2016년 10월 27일
답변: Walter Roberson 2016년 10월 27일
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!

답변 (1개)

Walter Roberson
Walter Roberson 2016년 10월 27일
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])

카테고리

Help CenterFile Exchange에서 Instrument Control Toolbox Supported Hardware에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by