limitation not taken into account
显示 更早的评论
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??
回答(2 个)
Walter Roberson
2013-3-6
0 个投票
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
2013-3-6
0 个投票
2 个评论
Walter Roberson
2013-3-6
How are you doing the minimization? It might be possible to put in a constraint
chrysoula
2013-3-7
编辑:Walter Roberson
2013-3-7
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Data API for C++ 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!