what is wrong with this?
显示 更早的评论
im trying to use lagrange multipliers to find mins and maxs and this is the code i wrote
syms x y L; f=(x^2)*y; g=x+(y^2)-16;
T=jacobian(f,[x y])-L*jacobian(g,[x y]);
[xsoln,ysoln,Lsoln]=solve(T,g)
im getting the following error messages:
Error using sym.getEqnsVars>checkVariables (line 92)
The second argument must be a vector of symbolic variables.
Error in sym.getEqnsVars (line 62)
checkVariables(vars);
Error in solve>getEqns (line 450)
[eqns, vars] = sym.getEqnsVars(argv{:});
Error in solve (line 225)
[eqns,vars,options] = getEqns(varargin{:});
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Common Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!