limitation not taken into account
Afficher commentaires plus anciens
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??
Réponses (2)
Walter Roberson
le 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
le 6 Mar 2013
0 votes
2 commentaires
Walter Roberson
le 6 Mar 2013
How are you doing the minimization? It might be possible to put in a constraint
chrysoula
le 7 Mar 2013
Modifié(e) : Walter Roberson
le 7 Mar 2013
Catégories
En savoir plus sur MATLAB Data API for C++ dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!