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/07/27 20:03:45
![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](/uploads/image/z/5169679-7-9.jpg?t=matlab%E5%B8%A6%E5%8F%82%E6%95%B0%E7%9A%84%E4%BA%8C%E5%85%83%E5%87%BD%E6%95%B0%E6%B1%82%E6%9C%80%E5%A4%A7%E5%80%BC%E9%97%AE%E9%A2%98syms+v+x1+x2+g+L1+L2S%3D%28v%5E2%2Asin%282%2Ax2%29%2B2%2Av%2Asin%28x2%29%2Asqrt%28v%5E2%2A%28cos%28x2%29%29%5E2%2B2%2Ag%2A%28L1%2Asin%28x1%29%2BL2%2Asin%28x2%29%29%29%29%2F%282%2Ag%29Sx1%3Ddiff%28S%2Cx1%29%3BSx2%3Ddiff%28S%2Cx2%29%3Bsolve%28Sx1%2C%27x1%27%29solve%28Sx2%2C%27x2%27%29Error+using+%3D%3D%3E+solveUnable+to+find+c)
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.