vectors must be at the same length error
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
fatemeh p
am 20 Okt. 2019
Kommentiert: fatemeh p
am 20 Okt. 2019
Hi, im trying to plot this fuction but im getting th 'vectors must be at the same length' error, Can anybody help to find a solution?
t=-10:10;
x = heaviside(t+2)-heaviside(t-2);
plot(t,x);
y = awgn(x,21,'measured');
plot(t,[x y]);
legend('Original Signal','Signal with AWGN');
0 Kommentare
Akzeptierte Antwort
Daniel M
am 20 Okt. 2019
You are concatenating x and y into a doubly long vector. If you want to plot both signals, do
plot(t,x,t,y)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Vibration Analysis finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!