问题描述:
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')
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')
问题解答:
我来补答展开全文阅读