limitation not taken into account
Show older comments
HEY, I am rather new in using matlab and I have a problem I cannot understand, I have the following limitation:
if (x_range(k)>y_range(l)) | (x_range(k)>z_range(j)) | (z_range(j)>y_range(l))
funM(k,l,j)=Inf;
I tried both funM(k,l,j)=Inf; and funM(k,l,j)=NaN;
The problem is that after I run it the result I get sometimes is z_range(j)>y_range(l). I cannot understand why it does not take into account my limitation. Any suggestions??
Answers (2)
Walter Roberson
on 6 Mar 2013
0 votes
You do not change z_range or y_range in this code, so if z_range(j) > y_range(l) here then it will continue to be true afterwards.
chrysoula
on 6 Mar 2013
0 votes
2 Comments
Walter Roberson
on 6 Mar 2013
How are you doing the minimization? It might be possible to put in a constraint
chrysoula
on 7 Mar 2013
Edited: Walter Roberson
on 7 Mar 2013
Categories
Find more on MATLAB Data API for C++ in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!