Work done this week:

1) Created the fft block.

The behavior of the fft function on a matrix is different in Scilab from that in Matlab and Octave. In Matlab and Octave, when a matrix is passed as argument to the fft function, it returns a matrix containing the fft of the columns of the matrix. e.g.

octave:1> fft([1,2,3;4,5,6])
ans =

   5   7   9
  -3  -3  -3

The same answer is returned by Matlab too. Here, [5,-3] is the fft of [1,4]. [7 -3] is the fft of [2 5] and so on. However, Scilab performs multidimensional fft. So, the answer returned by Scilab is different:

-->fft([1,2,3;4,5,6])
 ans  =
 
    21.  - 3. + 1.7320508i  - 3. - 1.7320508i  
  - 9.     0                  0            

For the fft block in dspblock, I've programmed according to the Matlab version of fft, to make the fft block in xcos analogous to the fft block in simulink.

2) Wrote tests using assert for meanblock, maxblock, minblock, rmsblock, stdblock, varianceblock.

I'd posted on the Scilab-dev mailing lists about writing test functions for xcos blocks. Clement suggested I use importXcosDiagram, xcos_simulate and assert to write test functions. I did so accordingly. However, whenever I use assert, my Scilab interpreter stops functioning. See the following screenshot. Scilab doesn't exit on typing exit, and it doesn't return an error even if I type garbage.

Error upon using assert

public: Contributor - Signal processing blockset/report20120617 (last edited 2012-06-17 08:54:12 by sumeet)