About CAT arguments dimension are not consistent
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
Réponse acceptée
Azzi Abdelmalek
le 20 Fév 2013
Modifié(e) : Azzi Abdelmalek
le 20 Fév 2013
If x is a column vector, you can t make an horizontal concatenation. Maybe you should do
x=[x;0]
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur DTMF dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!