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

问题描述:

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')
1个回答 分类:综合 2014-11-23

问题解答:

我来补答
solve(Sx1,x1)
pi/2
solve(Sx2,x2)
警告:Explicit solution could not be found.
再问: 意思是无法找到Sx2的解析解么
再答: Sx2无解析解呀。至少matlab2014解不了。

要不你题目有问题呀。
 
 
展开全文阅读
剩余:2000