DSPRelated.com
Forums

HELP - submatrix incorrectly defined ;(

Started by Richard Owlett November 16, 2006
I originally posted this to the Scilab group assuming i just had a 
syntax error. While waiting for a response, I started wondering if I was 
also headed for some DSP specific pitfalls.

Comments welcome.


***********

I know I'm making a basic (no pun intended) error.
But i just can not find the proper syntax.
My code is:


sheets = readxls('E:\parasitic.xls')
s1=sheets(1);             //get the first sheet
dwave=s1(:,2);
y=size(dwave,'r');
k=max(abs(dwave([2:y])));
dwave=dwave([2:y])/k;          //first line is col titles
                  //normalize array
for i=1:19
     j=500*(i-1);
     farray(i,:)=fft(dwave(j+1:j+500));
end


Scilab-4.0 chokes on
    farray(i,:)

I'm sure I've seen that syntax in the help files.
What obvious thing am I missing?

My eventual goal is a 3D surface plot of farray.
farray will eventually be larger than 19x500.
The data I'm using is a simple/simplistic test case.

corrections, pointers, general guidance appreciated.
Thank you.
Richard Owlett wrote:

> I originally posted this to the Scilab group assuming i just had a > syntax error. While waiting for a response, I started wondering if I was > also headed for some DSP specific pitfalls. > > Comments welcome. > > > *********** > > I know I'm making a basic (no pun intended) error. > But i just can not find the proper syntax. > My code is: > > > sheets = readxls('E:\parasitic.xls') > s1=sheets(1); //get the first sheet > dwave=s1(:,2); > y=size(dwave,'r'); > k=max(abs(dwave([2:y]))); > dwave=dwave([2:y])/k; //first line is col titles > //normalize array > for i=1:19 > j=500*(i-1); > farray(i,:)=fft(dwave(j+1:j+500)); > end > > > Scilab-4.0 chokes on > farray(i,:) > > I'm sure I've seen that syntax in the help files. > What obvious thing am I missing? > > My eventual goal is a 3D surface plot of farray. > farray will eventually be larger than 19x500. > The data I'm using is a simple/simplistic test case. > > corrections, pointers, general guidance appreciated. > Thank you.
ARGGHH ;< farray(i,:)=fft(dwave(j+1:j+500)); should be farray(i,:)=fft(dwave(j+1:j+500))';