Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: Using gear with exter
Posted:
Jun 20, 1996 9:13 AM


From: garyl@mathworks.com (Gary Levenson) In article <31C9072F.41C67EA6@itk.unit.no>, Jostein Vada <vada@itk.unit.no> writes:
> > How can I send a control signal to 'system' in the call to > gear('system',tf) at the Matlab command line, (without making a block > diagram in Simulink using a 'FromWorkspace' block as control signal, > and then saving this as 'system'). What I would like to be possible, is > using a command like: [x,y,t]=gear('system', tf, u(t)).
Hi,
If you have a block diagram to describe the system, use an input port to accept the input signal. This can then be passed in from the command line:
gear('sfun',tf,x0,options,ut)
where ut can be a string or a table of values.
If you have equations which describe the system, it may be easier to write an SFunction, which can then be called in the same way.
HTH,
Gary
=========================================== Gary Levenson gary@mathworks.com The MathWorks, Inc. ph: 508 6477000 http://www.mathworks.com =========================================== 



