problems connecting simulink to dsp board

Started by ario fanie April 23, 2007
I'm having a problem configuring simulink to dsp tms6713. I'm using matlab 7.04. I'm connecting from workspace through embedded matlab function block in simulink and trying to put all of the processed data in workspace again.

And this is what happens when i'm trying to run my simulation in simulink :

Size of index expression is not statically known.

Function 'Embedded MATLAB Function' (#18.428.464), line 13, column 19:
"i-overlap):(i+length_frame-1+overlap"

This is my program listing in embedded matlab function block:

function Fhasil =recognition(speech)

Fhasil=extraction(speech,100,78,11025);
function sframe = extraction(speech,length_frame,overlap,fs)

F2 = 0;
nmax_frame=floor(length(speech)/length_frame);
sp=[zeros(1,overlap) speech' zeros(1,overlap)]';
frame=0;

for i=overlap+1:length_frame:nmax_frame*length_frame,
frame=frame+1;
sframe=sp((i-overlap):(i+length_frame-1+overlap))
end;

F

I also attached my simulation diagram.

I have read that there is a limitation for indexing if we use embedded matlab function block. Could you help me how to solve this problem?
Thank you very much.

i'm sorry if my english is not good.

Send instant messages to your online friends http://uk.messenger.yahoo.com