How do you plot a signal that has been broken up into time brackets?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jared Joselowitz
am 26 Aug. 2020
Beantwortet: Kiran Felix Robert
am 28 Aug. 2020
I have got this signal that has a different defintion for certain time parameters. How do I plot the signal m(t) on one graph?

0 Kommentare
Akzeptierte Antwort
Kiran Felix Robert
am 28 Aug. 2020
Hi Jared,
t = -1:0.01:5;
m = zeros(1,length(t));
idx = (t>=0) & (t<1);
m(idx) = t(idx);
idx = (t>=1) & (t<2);
m(idx) = 2 - t(idx);
plot(t,m)
Kiran Felix Robert
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!