Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Error in (embedded) MATLAB function
Replies: 3   Last Post: Feb 15, 2013 12:59 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Phil Goddard

Posts: 342
Registered: 1/27/12
Re: Error in (embedded) MATLAB function
Posted: Feb 15, 2013 12:59 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

The problem is that you are not setting output values between sample times.
(Note, the block is not discrete, you are artificially trying to make it discrete but it is not, and hence the solver will call your block at times other than when floor(u3/Ts) == 1).
You need to set values for y1 and y2 every time the block is called, not just when floor(u3/Ts) >= 1.

But, isn't your code just a discrete state-space description?
If so, why not use the discrete state-space block?

Phil.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.