From: Andy Luotto on
hi
i am passing data to a simulink model from a matlab via the 'from
workspace' block

Fs = 250000;
Ts = 1./Fs;

NrOfFrames = 4
NrSamples = 65536-1;

opts = simset ( 'Solver', 'ode5', 'RelTol', 1e-3,'FixedStep', 1./
(Fs) );
for fr=1:NrOfFrames
fr
InBits=1
Mod=3
sim('ofdm', 1/Fs, opts);
length(OfdmSamples)
end

InBits and Mod are the Data filed of a pair of 'From Workspace' Block
I get the following error

Error using ==> top_ofdm at 49
Error due to multiple causes:
--> Invalid matrix-format variable specified as workspace input in
'ofdm/Bits from WS'. The matrix must have two dimensions and at least
two
columns. Complex signals of any data type and non-double real signals
must
be in structure format. The first column must contain time values and
the
remaining columns the data values.
--> Invalid matrix-format variable specified as workspace input in
'ofdm/Mod
from WS'. The matrix must have two dimensions and at least two
columns.
Complex signals of any data type and non-double real signals must be
in
structure format. The first column must contain time values and the
remaining columns the data values.

Caused by:
Error using ==> top_ofdm at 49
Invalid matrix-format variable specified as workspace input in
'ofdm/Bits from WS'. The matrix must have two dimensions and at
least
two columns. Complex signals of any data type and non-double real
signals must be in structure format. The first column must contain
time
values and the remaining columns the data values
Error using ==> top_ofdm at 49
Invalid matrix-format variable specified as workspace input in
'ofdm/Mod
from WS'. The matrix must have two dimensions and at least two
columns.
Complex signals of any data type and non-double real signals must
be in
structure format. The first column must contain time values and
the
remaining columns the data values

so it looks like the simulink model is expect a time, data array.
question is: how do i pick up the correct time to be associated to the
input?
is overall this approach correct?
thanks
 | 
Pages: 1
Prev: short pause
Next: Time Shift and Z Transform