The 'sdpvar' class does not support code generation.
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jianhui Zhi
le 14 Oct 2017
Commenté : Jianhui Zhi
le 19 Oct 2017
This problem occurs during the usage of Yalmip R20150204 toolbox in either 'S-function' or 'MATLAB Function' of Simulink. The input variables are Ru, W_est,and v. The output variables are s and u. The code is shown as follows(Matlab version R2014a). How can I make the Yalmip R20150204 toolbox work in Simulink module,either 'S-function' or 'MATLAB Function'? Bv = 1; B = [1 1 1]; n = size(B,1); m = size(B,2); s = sdpvar(n,1); u = sdpvar(m,1); Q = eye(n); % constraints F1=[B*W_est*u==Bv*v+s]; F2=[F1, u<=5*ones(m,1), u>=-5*ones(m,1)]; solvesdp(F2, 10^5*s'*Q*s+u'*Ru*u); s= double(s); u= double(u);
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Array and Matrix Mathematics dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!