Vectors must be the same lengths.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
tariq almalki
am 3 Jan. 2017
Kommentiert: Star Strider
am 4 Jan. 2017
Hi guys I am trying to add a white Gaussian noise to FM signal
this is my code fc = 20; %Carrier Frequency fs = 1000; %Signal Frequency t = 0:0.00001:0.002; x = 2*cos(2*pi*t)-3*sin(2*pi*2*t); dev = 50; y = fmmod(x,fc,fs,dev); r = awgn(x,10,'measured'); plot(t,[y r]) legend('Original Signal','Signal with AWGN')
but i got this error "Vectors must be the same lengths".
can you help me ?
1 Kommentar
Jan
am 3 Jan. 2017
Please read and consider: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup#answer_18099 . Thanks.
Akzeptierte Antwort
Star Strider
am 3 Jan. 2017
Try this instead:
plot(t,[y; r])
The (;) creates a (2xN) matrix that plot will accept.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Measurements and Feature Extraction finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!