OPTIMIZER: Undefined function 'is' for input arguments of type 'double'

118 views
Skip to first unread message

Knight Kulkaew

unread,
Jul 26, 2016, 10:25:37 PM7/26/16
to YALMIP
Hi Johan,

I have been having the following error without exactly knowing why it occurs:

Undefined function 'is' for input arguments of type 'double'.

Error in optimizer (line 118)
        if is(u{i},'complex')

Error in F_RUN_2 (line 149)
OPT = optimizer(Cons,obj,options,delta,{Zcut,Df,Dr,t,Nu,phi_xi});

When I tried solving the code by using "optimize" function, it solves fine, but when I'm converting it into an optimizer object, it gives me that error. 

What is the problem? How do it rectify it?

Cheers

Knight
F_RUN_2.m
PreRun2.mat

Johan Löfberg

unread,
Jul 27, 2016, 2:47:39 AM7/27/16
to YALMIP
You've defined Dr to be an output expression from optimizer, but it is a constant, which doesn't make sense.

Knight Kulkaew

unread,
Jul 27, 2016, 5:19:21 AM7/27/16
to YALMIP
That is certainly true - I will have to be more careful in the future. Thanks Johan.
Reply all
Reply to author
Forward
0 new messages