The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 358
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?


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.