Creating ramp signal from -1 to 1
Ältere Kommentare anzeigen
I am trying to create a linear line from y = -1 to 1 from x = 0 to 2000 but my code is creating the linear line from y = 0 to 1. Where am I going wrong with this?
y = 167
t = 60
x = linspace(0, t, y*t);
rampIdx = 2000;
s4 = zeros(1, length(x));
s4(rampIdx+1:end)=1;
s4(1:rampIdx+1) = -1;
s4(1:rampIdx+1) = (1:rampIdx)/rampIdx
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
