matlab带参数的二元函数求最大值问题syms v x1 x2 g L1 L2S=(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 ==> solveUnable to find c
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/25 11:10:39
matlab带参数的二元函数求最大值问题syms v x1 x2 g L1 L2S=(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 ==> solveUnable to find c
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带参数的二元函数求最大值问题syms v x1 x2 g L1 L2S=(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 ==> solveUnable to find c
solve(Sx1,x1)
pi/2
solve(Sx2,x2)
警告:Explicit solution could not be found.