필터 지우기
필터 지우기

Vectors must be the same length

조회 수: 1 (최근 30일)
Mya
Mya 2021년 11월 27일
댓글: Star Strider 2021년 11월 27일
N1=64;
Y1=fft(y,N1);
x= (0:29);
subplot(3,1,2)
plot(x,abs(Y1))
xlabel('Frequency (Hz)');
ylabel('Amplitude');
%HOW TO MAKE IT SAME LENGTH?(LINE5)

채택된 답변

Star Strider
Star Strider 2021년 11월 27일
The number of elements in ‘Y1’ in the plot need to be the same as the number in ‘x’ so one way would be to re-define ‘x’ to be the desired length with respect to ‘Y1’ and another would be:
plot(x,abs(Y1(1:numel(x))))
Use the approach that gives the desired result.
.
  댓글 수: 5
Mya
Mya 2021년 11월 27일
ok tq for ur guide
Star Strider
Star Strider 2021년 11월 27일
As always, my pleasure!
.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by