作业帮 > 综合 > 作业

matlab带参数的二元函数求最大值问题

来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/05/16 11:53:38
matlab带参数的二元函数求最大值问题
syms v x1 x2 g L1 L2
S=(v^2*sin(2*x2)+2*v*sin(x2)*sqrt(v^2*(cos(x2))^2+2*g*(L1*sin(x1)+L2*sin(x2))))/(2*g)
Sx1=diff(S,x1);
Sx2=diff(S,x2);
solve(Sx1,'x1')
solve(Sx2,'x2')
Error using ==> solve
Unable to find closed form solution.
Error in ==> sym.solve at 49
[varargout{1:max(1,nargout)}] = solve(S{:});
Error in ==> pirandao2 at 6
solve(Sx2,'x2')
matlab带参数的二元函数求最大值问题
solve(Sx1,x1)
pi/2
solve(Sx2,x2)
警告:Explicit solution could not be found.
再问: 意思是无法找到Sx2的解析解么
再答: Sx2无解析解呀。至少matlab2014解不了。

要不你题目有问题呀。