Prev: MATLAB Builder for Excel
Next: fprintf flexible usage
From: Sergey on 3 Jun 2010 05:30 Hello, I try to use mask (one parametr "n", type: text) for subsystem block, which contains embedded matlab function. In initialization block in "edit mask" wrote: ns=get_param('kolumn/subsystem','n'); assignin('base','nst',str2num(ns)); That's all about mask. Next, in Embedded Matlab function block i write: function y = fcn(u) % This block supports the Embedded MATLAB subset. % See the help menu for details. eml.extrinsic('assignin'); eml.extrinsic('evalin'); persistent x; persistent nst; if isempty(nst) nst=evalin('base','nst'); else nst=nst; end nm=nst; nm=nm+1; %%if i'll delete this string, everything would be ok if isempty(x) x=zeros(nm); else x=x; end y = 1; As a result, i have a mistake. But i don't know, how to check this. Could you explain me, please. Thanks a lot. Best regards, Sergey
|
Pages: 1 Prev: MATLAB Builder for Excel Next: fprintf flexible usage |