"Guoliang Zhang" <zhangl@mathworks.com> wrote in message
<g6apdp$nqo$1@fred.mathworks.com>...
> is the mask on the Sfunction block sufficent?
>
[quoted text clipped - 12 lines]
> >
> > -joseph
1. Mask the S-function. Set your variable names to radius1
and radius2.
2. In the GUI callback, write
set_param([<blockname>,'radius1',radius1string)
If you are using edit boxes for setting radii, replace
radius1string with get(hObject,'string'). Blockname is the
full path to the masked S-function block. You'll have better
success if block names do not contain line breaks or special
characters.
HTH,
Omur Bas
www.promodsoftware.com.tr
Joseph Stuber - 28 Jul 2008 15:56 GMT
Omur,
Thank you very much for your help. I am trying to input
the arguments to my s-function in simulink in the following
way: I have constant blocks set up (which can have their
values changed from my GUI) fed into the s-function block.
However, I am recieving an error message. "Error in port
widths or dimensions." "...the output of port 1 is a 1
dimensional vector with one elements." I do not see
anything wrong with my simulink blocks. Is the code
responsible for this error? How would i go about fixing it?
Thank you very much!
> 1. Mask the S-function. Set your variable names to radius1
> and radius2.
[quoted text clipped - 10 lines]
> Omur Bas
> www.promodsoftware.com.tr