필터 지우기
필터 지우기

vectors must be at the same length error

조회 수: 2 (최근 30일)
fatemeh p
fatemeh p 2019년 10월 20일
댓글: fatemeh p 2019년 10월 20일
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');

채택된 답변

Daniel M
Daniel M 2019년 10월 20일
You are concatenating x and y into a doubly long vector. If you want to plot both signals, do
plot(t,x,t,y)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Vibration Analysis에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by