From: Salvatore on
Dear all,
I built a simulink model where I used an embedded matlab block in order to integrate an algorithm. The input and output of this block have variable size. If I run it, simulink doesn't give me errors or warning either if I set the input and the output of this block as if they have variable size or if I don't set theml.
But if I try to generate an S-function from the embedded matlab block, using the Real time-workshop, it doesn't work and simulink says: "Error in port widths or dimensions"...
It seems that in the S-function generated by the Real-time workshop, simulink is not able to recognize the variable sizes of the input and output of the block or I obmitted something when I generated the S-function.
Could you help me in order to solve it?
Thanks in advance!

P.s: if I create an handwritten S-function, will I have the some problem?