Error creating an overloaded zero matrix

18 views
Skip to first unread message

optimizer

unread,
Apr 11, 2020, 3:41:46 AM4/11/20
to YALMIP
Dear Prof.Lofberg,

I am trying to create a zeros matrix with sdpvar elements, as shown here: https://yalmip.github.io/command/zeros/.

y = sdpvar(1,1);
X = zeros(5,5,'like',sdpvar);
X(1,5) = y;

However I get this error:

Error using zeros
Input following 'like' is not a numeric or logical array.

Suggestions?

Johan Löfberg

unread,
Apr 11, 2020, 4:04:13 AM4/11/20
to YALMIP
Your matlab version is too old

optimizer

unread,
Apr 11, 2020, 4:06:22 AM4/11/20
to YALMIP
I am running matlab 2017b, which version should i have at least?

Johan Löfberg

unread,
Apr 11, 2020, 4:09:37 AM4/11/20
to YALMIP
Don't know
Reply all
Reply to author
Forward
0 new messages