二元函数最小值求解程序错误。

程序: f=@(x)243530*sqrt(294485-76396*cos(x(1)))*sin(x(2)-1.780235837-asin(71*sin(x(1))/sqrt(294485-76396*cos(x(1)))))/sqrt(299526-76396*cos(x(1))-142*sqrt(294485-76396*cos(x(1)))*cos((2)-1.780235837-asin(71*sin(x1)/sqrt(294485-76396**cos(x(1)))));x0=[1;3];[x,b,c,d]=fminsearch(f,x0) 程序太长,截图不全,求解答。

 采纳的回答

renidoy
renidoy 2022-11-21

0 个投票

1、检查x1、x2的下标;
2、检查小括号。
f = @(x)243530*sqrt(294485-76396*cos(x(1)))*sin(x(2)-1.780235837-asin(71*sin(x(1))/sqrt(294485-76396*cos(x(1)))))/sqrt(299526-76396*cos(x(1))-142*sqrt(294485-76396*cos(x(1)))*cos(x(2)-1.780235837-asin(71*sin(x(1)))/sqrt(294485-76396*cos(x(1)))))

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 MATLAB 快速入门 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!