|
"NZTideMan" <mulgor@gmail.com> wrote in message
news:44318b26-6310-4d35-aee4-91dfa4142cb3@j9g2000prh.googlegroups.com...
> On Oct 28, 4:49 pm, "asdafa " <scrydo_de...@hotmail.com> wrote:
> > Hello everyone, Im new in matlab and i have some problems I use this
> > code:
> >
> > [filename, pathname] = uigetfile('*.*', 'Pick any file');
> > [y fs nbits] = wavread(filename);
> > spectrogram(y);
> >
> > But I have this error:
> > Error in ==> dsa at 3
> > spectrogram(y);
> > ??? Error using ==> spectrogram at 113
> > X must be a vector (either row or column).
> >
> > Error in ==> dsa at 3
> > spectrogram(y);
> >
> > can anyone help me with the code please, thanks a lot!
>
> Well, I know nothing about the function spectrogram, but the error
> message seems pretty clear.
> Your y is not a vector. It is either a matrix or a scalar.
Actually, a scalar is a vector, just a short one.
>> isvector(284)
ans =
1
The definition of a vector is a 1-by-n or n-by-1 array:
ISVECTOR(V) returns logical true (1) if V is a 1 x n or n x 1 vector,
where n >= 0, and logical false (0) otherwise.
In the case of a scalar, n = 1.
> Type
> size(y)
> and you will find out which it is.
My suspicion is that it will be an n-by-2 array (2 channels.)
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|