Hi everyone,
I am getting the following error when I am implementing the code written below:
%Read the original signal
[y,fs]=wavread('angry');
>> a=1;
>> samples=fs*window_d; %Number of samples per window
rects=rectwin(samples); %rectangular window of duration 20ms
>> frame=y(a:a+samples-1)*rects';
>> acf=xcorr(frame);
error:?? Error using ==> ifft
Out of memory. Type HELP MEMORY for your options.
Error in ==> xcorr>matrixCorr at 94
c = ifft(C);
Error in ==> xcorr at 52
[c,M,N] = matrixCorr(x);
What would be the alternative way to implement the above code.Pls help and thanx in advance.
|
|
0
|
|
|
|
Reply
|
astro
|
12/2/2009 10:02:01 PM |
|
Maybe you want to specifically use the xcorr function but in order to use xcorr as an autocorrelation the option 'coeff' would need to be used. I have attempted using xcorr for some time however the output is the xcorr out combined with the autocorrelation out which becomes messy to handle when processing the data. I found a much faster, more straight forward, script at the follow link titled auto.m which was a huge help. Sorry i can't offer more assistance for your application. http://www.atmos.washington.edu/~dennis/552_Software.html
|
|
0
|
|
|
|
Reply
|
David
|
12/2/2009 10:24:02 PM
|
|
"astro mmi" <pyarsa_madhu@yahoo.co.in> wrote in message <hf6o4o$ho8$1@fred.mathworks.com>...
> Hi everyone,
> I am getting the following error when I am implementing the code written below:
> %Read the original signal
> [y,fs]=wavread('angry');
> >> a=1;
> >> samples=fs*window_d; %Number of samples per window
> rects=rectwin(samples); %rectangular window of duration 20ms
> >> frame=y(a:a+samples-1)*rects';
> >> acf=xcorr(frame);
>
> error:?? Error using ==> ifft
> Out of memory. Type HELP MEMORY for your options.
>
> Error in ==> xcorr>matrixCorr at 94
> c = ifft(C);
>
> Error in ==> xcorr at 52
> [c,M,N] = matrixCorr(x);
> What would be the alternative way to implement the above code.Pls help and thanx in advance.
Can you tell us what size frame is? Is it a matrix and if it is, do you really want to input a matrix to xcorr()? I can see that rects' is a row vector (1xN), but if you are multiplying it by y a Mx1 column vector, than you're getting a MxN matrix as an input to xcorr() and that can get computationally expensive very quickly.
wayne
|
|
0
|
|
|
|
Reply
|
Wayne
|
12/2/2009 10:27:03 PM
|
|
Thank you so much.The frame size is 320*320 i.e, after multiplication with the rectangular window.
"Wayne King" <wmkingty@gmail.com> wrote in message <hf6pjn$gus$1@fred.mathworks.com>...
> "astro mmi" <pyarsa_madhu@yahoo.co.in> wrote in message <hf6o4o$ho8$1@fred.mathworks.com>...
> > Hi everyone,
> > I am getting the following error when I am implementing the code written below:
> > %Read the original signal
> > [y,fs]=wavread('angry');
> > >> a=1;
> > >> samples=fs*window_d; %Number of samples per window
> > rects=rectwin(samples); %rectangular window of duration 20ms
> > >> frame=y(a:a+samples-1)*rects';
> > >> acf=xcorr(frame);
> >
> > error:?? Error using ==> ifft
> > Out of memory. Type HELP MEMORY for your options.
> >
> > Error in ==> xcorr>matrixCorr at 94
> > c = ifft(C);
> >
> > Error in ==> xcorr at 52
> > [c,M,N] = matrixCorr(x);
> > What would be the alternative way to implement the above code.Pls help and thanx in advance.
>
> Can you tell us what size frame is? Is it a matrix and if it is, do you really want to input a matrix to xcorr()? I can see that rects' is a row vector (1xN), but if you are multiplying it by y a Mx1 column vector, than you're getting a MxN matrix as an input to xcorr() and that can get computationally expensive very quickly.
> wayne
|
|
0
|
|
|
|
Reply
|
astro
|
12/2/2009 11:11:04 PM
|
|
"astro mmi" <pyarsa_madhu@yahoo.co.in> wrote in message <hf6s68$m35$1@fred.mathworks.com>...
> Thank you so much.The frame size is 320*320 i.e, after multiplication with the rectangular window.
>
> "Wayne King" <wmkingty@gmail.com> wrote in message <hf6pjn$gus$1@fred.mathworks.com>...
> > "astro mmi" <pyarsa_madhu@yahoo.co.in> wrote in message <hf6o4o$ho8$1@fred.mathworks.com>...
> > > Hi everyone,
> > > I am getting the following error when I am implementing the code written below:
> > > %Read the original signal
> > > [y,fs]=wavread('angry');
> > > >> a=1;
> > > >> samples=fs*window_d; %Number of samples per window
> > > rects=rectwin(samples); %rectangular window of duration 20ms
> > > >> frame=y(a:a+samples-1)*rects';
> > > >> acf=xcorr(frame);
> > >
> > > error:?? Error using ==> ifft
> > > Out of memory. Type HELP MEMORY for your options.
> > >
> > > Error in ==> xcorr>matrixCorr at 94
> > > c = ifft(C);
> > >
> > > Error in ==> xcorr at 52
> > > [c,M,N] = matrixCorr(x);
> > > What would be the alternative way to implement the above code.Pls help and thanx in advance.
> >
> > Can you tell us what size frame is? Is it a matrix and if it is, do you really want to input a matrix to xcorr()? I can see that rects' is a row vector (1xN), but if you are multiplying it by y a Mx1 column vector, than you're getting a MxN matrix as an input to xcorr() and that can get computationally expensive very quickly.
> > wayne
Do you really want to compute the autocorrelation on a matrix? or do you simply wish to compute the autocorrelation sequence for a 320 x1 vector? And why rectwin(), that's just a vector of ones.
|
|
0
|
|
|
|
Reply
|
Wayne
|
12/2/2009 11:33:04 PM
|
|
But if I simply used the definition of the acf,still I'd be having a problem with the index reference starting with a zero.
"Wayne King" <wmkingty@gmail.com> wrote in message <hf6tfg$9od$1@fred.mathworks.com>...
> "astro mmi" <pyarsa_madhu@yahoo.co.in> wrote in message <hf6s68$m35$1@fred.mathworks.com>...
> > Thank you so much.The frame size is 320*320 i.e, after multiplication with the rectangular window.
> >
> > "Wayne King" <wmkingty@gmail.com> wrote in message <hf6pjn$gus$1@fred.mathworks.com>...
> > > "astro mmi" <pyarsa_madhu@yahoo.co.in> wrote in message <hf6o4o$ho8$1@fred.mathworks.com>...
> > > > Hi everyone,
> > > > I am getting the following error when I am implementing the code written below:
> > > > %Read the original signal
> > > > [y,fs]=wavread('angry');
> > > > >> a=1;
> > > > >> samples=fs*window_d; %Number of samples per window
> > > > rects=rectwin(samples); %rectangular window of duration 20ms
> > > > >> frame=y(a:a+samples-1)*rects';
> > > > >> acf=xcorr(frame);
> > > >
> > > > error:?? Error using ==> ifft
> > > > Out of memory. Type HELP MEMORY for your options.
> > > >
> > > > Error in ==> xcorr>matrixCorr at 94
> > > > c = ifft(C);
> > > >
> > > > Error in ==> xcorr at 52
> > > > [c,M,N] = matrixCorr(x);
> > > > What would be the alternative way to implement the above code.Pls help and thanx in advance.
> > >
> > > Can you tell us what size frame is? Is it a matrix and if it is, do you really want to input a matrix to xcorr()? I can see that rects' is a row vector (1xN), but if you are multiplying it by y a Mx1 column vector, than you're getting a MxN matrix as an input to xcorr() and that can get computationally expensive very quickly.
> > > wayne
>
> Do you really want to compute the autocorrelation on a matrix? or do you simply wish to compute the autocorrelation sequence for a 320 x1 vector? And why rectwin(), that's just a vector of ones.
|
|
0
|
|
|
|
Reply
|
astro
|
12/3/2009 12:08:01 AM
|
|
|
5 Replies
508 Views
(page loaded in 0.056 seconds)
|