About CAT arguments dimension are not consistent
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello, guys, i face a problem, please help me~
clear all;
clc;
[x Fs]=wavread('PhoneNumberA_2013.wav');
N=length(x);
x=[x 0];
K =round([697 770 852 941 1209 1336 1407]*N/8000);
y=zeros(1,N);
for k=1:7
v_1=0;
v_2=0;
v=0;
for i=1:N+1
v_2=v_1;
v_1=v;
v=2*cos(2*pi*k/N)*v_1-v_2+x(i);
end
y(K(k)) = v-exp(-j*2*pi*k/N)*v_1;
end
k=0:N-1;
stem(k,y)
The error information said Error using horzcat CAT arguments dimensions are not consistent. the specific error lies in x=[x 0]
I do not how to fix that, plz help me, thank you
채택된 답변
Azzi Abdelmalek
2013년 2월 20일
편집: Azzi Abdelmalek
2013년 2월 20일
If x is a column vector, you can t make an horizontal concatenation. Maybe you should do
x=[x;0]
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 DTMF에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!