limitation not taken into account
Ältere Kommentare anzeigen
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??
Antworten (2)
Walter Roberson
am 6 Mär. 2013
0 Stimmen
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
am 6 Mär. 2013
0 Stimmen
2 Kommentare
Walter Roberson
am 6 Mär. 2013
How are you doing the minimization? It might be possible to put in a constraint
chrysoula
am 7 Mär. 2013
Bearbeitet: Walter Roberson
am 7 Mär. 2013
Kategorien
Mehr zu MATLAB Data API for C++ finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!