I am using GA in MATLAB to minimize a convex function. I am getting the following error,
Error using constrValidate (line 59)Constraint function must return real value.
But when in the cost.m the system called "sys" is created (which is a global variable), then the constr function computes its H_\infty norm which is a real value. Still I don't understand why I am getting this error.
My codes are attached.
Any help is really appreciated.
Thanks
Best Answer