Why is this matlab function causing trouble in the r2013a version?

Hi,
I just purchased the matlab r2013a software version. The code below was running without error in the previous version I had (r2011a). But when I run it in the r2013a version I get an error message.
Please help.
function VowelFormants = FormantsExtraction (Vowel, fs)
[Vowel fs]=wavread('SymphonyVowel.wav');
n = round(fs/1000) + 2;
w = hamming(length(Vowel));
Vowel = Vowel.*w;
th = ar(Vowel,n); % auto-regressive model of voice
[b,a] = tfdata(th); % transfer function of vocal tract
[h,w] = freqz(b,a);
end
ERROR MESSAGE: Undefined function 'mrdivide' for input arguments of type 'cell'.
Error in freqz (line 101) [h,w,options] = firfreqz(b/a,options);
Error in FormantsExtraction (line 8) [h,w] = freqz(b,a); % frequency response of vocal tract
How can I fix this problem? Your help is much appreciated. Thank you.

10 comentarios

tfdata() is from the Control Systems toolbox, which does not have a freqz(). Are you trying to use freqz() from the Signal Processing Toolbox or from the DSP Toolbox ?
MatlabFan
MatlabFan el 4 de Abr. de 2013
Editada: Walter Roberson el 4 de Abr. de 2013
Thanks for commenting Walter.
I have
  • matlab & simulink r2013a
  • system identification toolbox
  • database toolbox
So, I think I am trying to use it from the DSP System toolbox.
Are you sure? hamming() is from the Signal Processing Toolbox, unless you are using an implementation from the File Exchange.
Since you said it, it is from the Signal Processing Toolbox. what are my options then?
Please show the output of
which ar(0)
and of
which -all ar
which -all tfdata
This will help me trace which routines are being called.
Notes to myself:
- for which ar(0) the output is: C:\Program Files (x86)\MATLAB\R2013a Student\toolbox\ident\ident\ar.m
- for which -all ar the output is: C:\Program Files (x86)\MATLAB\R2013a Student\toolbox\ident\ident\ar.m
- for which -all tfdata the output is: C:\Program Files (x86)\MATLAB\R2013a Student\toolbox\shared\controllib\engine\@DynamicSystem\tfdata.m % DynamicSystem method
At the moment I do not understand why the ar() call did not fail, as you are not passing ar an iddata object as the documentation indicates it requires. The examples I find would have required that you used
Vowel = iddata(Vowel);
before the ar() call.
Without that iddata() call, I cannot predict what the output data type is from ar().
MatlabFan
MatlabFan el 4 de Abr. de 2013
Editada: MatlabFan el 4 de Abr. de 2013
Sir, the error message is the same even after I implemented
Vowel = iddata(Vowel);
before the ar() call. The problem is definitely with the freqz() function.
Any more recommendations? Actually I hope you do have something for me.
I will be eating my meal now; I will continue my research later.
Thank you. I appreciate your time.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Preguntada:

el 3 de Abr. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by