hi,it' possible to plot in different color? (example : line color yellow but the last point are colored in black)

 Akzeptierte Antwort

Paul
Paul am 2 Mai 2024
Bearbeitet: Paul am 2 Mai 2024

0 Stimmen

There may be fancy way to do it with a single line (or other type of) object, but it's easy to do it with two
t = 0:.01:1;
y = sin(2*pi*10*t);
figure
ii = find(t <= 0.35);
plot(t(ii),y(ii),'r',t(ii(end):end),y(ii(end):end),'k')

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 2 Mai 2024

Bearbeitet:

am 2 Mai 2024

Community Treasure Hunt

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

Start Hunting!

Translated by