我在做一个优化的问题,运行的时候显示
Warning: Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
> In C:\MATLAB6p5p1\toolbox\optim\fmincon.m at line 213
??? Error using ==> fmincon
FMINCON cannot continue because user supplied objective function
failed with the following error:
Error using ==> ^
Function '^' is not defined for values of class 'cell'.
请问这是什么意思,怎么解决,请给予指点!谢谢!
========================
请勿重复发贴。
By xjzuo
========================
function f=myfun(x)
f=[1-0.03*0.05731]*([4377-1.4*x(1)+4.77*10^(-4)*x(1)^2-5.07*10^(-8)*x(1)^3]*x(1)*1.3*1.142+1.142*x(2)*0.86*10^3)*0.10608+1.95*2600*3600*x(1)*{35169.12*[0.32+8.9*10^(-5)*x(1)-3.3*10^(-8)*x(1)^2+3.8*10^(-12)*x(1)^3]}^(-1)+1.95*1050*0.11066*x(4)+1.95*900*0.0806*x(5)+[0.241+0.00329*x(1)-1.12*10^(-6)*x(1)^2+1.274*10^(-10)*x(1)^3]*10^4+[0.074*x(1)-4.4*10^(-5)*x(1)^2+1.668*10^(-8)*x(1)^3-1.84*10^(-12)*x(1)^4]*2600+0.9226*x(3)*2600-0.258*2220*1050-0.256*2590*900-0.9226*x(1)*2600;