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: how to plot a function subject to constraints.
Replies: 14   Last Post: Jan 7, 2013 1:15 PM

Advanced Search

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

Posts: 8
Registered: 12/30/12
Re: how to plot a function subject to constraints.
Posted: Jan 7, 2013 11:24 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Whoops. Make that
> infeasible=~all(G1(:)<=0) | ~all(G2(:)<=0);
> Also, leave x2,x3 alone. Instead, do
> f=1.10471.*x1^2.*x2+0.04811.*x3.*x4.*(14.0+x2);
> f(infeasible)=nan;

> > %constraints are applied to f(x)
> > f=f*mod_neg_step(g1)*mod_neg_step(g2)*mod_neg_step(g3)*mod_neg_step(g4)...
> > *mod_neg_step(g5)*mod_neg_step(g6)*mod_neg_step(g7);

> =============
> No idea what this is for. I think it should be unnecessary with the above.

thank you very much. now, i cant get different results while i change the values of constants :)

but it gave me a flat shape. is this because of the function?

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.