Thread Subject: spectrogram

Subject: spectrogram

From: asdafa

Date: 28 Oct, 2009 03:49:03

Message: 1 of 5

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!

Subject: spectrogram

From: NZTideMan

Date: 28 Oct, 2009 06:32:25

Message: 2 of 5

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.
Type
size(y)
and you will find out which it is.

Subject: spectrogram

From: Steven Lord

Date: 28 Oct, 2009 13:45:21

Message: 3 of 5


"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

Subject: spectrogram

From: Matt

Date: 28 Oct, 2009 15:17:06

Message: 4 of 5

NZTideMan <mulgor@gmail.com> wrote in message <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.

Well, in fairness to the OP, the error message would have been clearer if it had said
"y must be a vector (either row or column)" or else providing some indication of what X refered to...

Subject: spectrogram

From: asdafa

Date: 10 Nov, 2009 05:00:19

Message: 5 of 5

"asdafa " <scrydo_death@hotmail.com> wrote in message <hc8evf$jjs$1@fred.mathworks.com>...
> 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!

Thanks everyone I solved the problem, thanks a lot!!
good to know I can count with experts!
 

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
spectrogram asdafa 27 Oct, 2009 23:54:06
rssFeed for this Thread

Contact us at files@mathworks.com