conditions writing in matlab

11 vues (au cours des 30 derniers jours)
超 李
超 李 le 5 Juil 2020
Commenté : Johan Löfberg le 24 Juil 2020
I don't know what is the problem about the codes which is used to deal with the follwing model.
I hope to get your help ,it is greatly appreciated !
The codes is :
for j = 1:50
for o = 1:50
if j ~= o
F = [F abs(x(:,j)-x(:,o))>0];
end
end
end
The model is :
r(j):@sum(k(i):@abs(x(i,j)-x(i,j)))>0; (It's in lingo)
  7 commentaires
超 李
超 李 le 5 Juil 2020
I have tested, it is a error.
Constraint converted to logical can not be agreed.
error in YALMIP_3 (line 114)
if x(:,j)~=x(:,o)
my new codes are :
for j = 1:50
for o = 1:50
if x(:,j)~=x(:,o)
F = [F abs(x(:,j)-x(:,o))>0];
end
end
end
It is very important for me .Thank you anyway.
I am a chinese, my 'wechat' numbers are 18734658148 , and my 'qq' numbers are 2328246279.
I'd like to have your contact information.
we can be good friends.
Johan Löfberg
Johan Löfberg le 24 Juil 2020
In case you haven't already, you should post this on the YALMIP Google groups instead for support.
The problem is that you are using a strict inequality, which isn't supported (as all the warnings are telling you, very loudly)

Connectez-vous pour commenter.

Réponses (1)

madhan ravi
madhan ravi le 5 Juil 2020
  1 commentaire
超 李
超 李 le 5 Juil 2020
I have tested it, but it does’t work. The error is “ In > (line 12) In YALMIP_3 (line 115) 警告: Strict inequalities are not supported. A non-strict has been added instead')”. The whole codes in “ https://ww2.mathworks.cn/matlabcentral/answers/559355-yalmip-using-in-matlab”

Connectez-vous pour commenter.

Catégories

En savoir plus sur Verification, Validation, and Test dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by