Set random true vpasolve

1 次查看(过去 30 天)
Pavel
Pavel 2014-5-7
评论: Stephen 2015-1-13
Hy. I want to solve a system of nonliniar equations and I need multiple solutions. So I try to set random true for the vpasolve function but I get the following error:
Error using getEqnsVars (line 50)
Expecting two arguments: a vector of equations and a vector of variables.
Error in sym/vpasolve (line 95)
[eqns,vars] = getEqnsVars(varargin{1:N});
Error in Untitled (line 10)
[a, b]=vpasolve([diff_f1, diff_f2], [a, b], 'random', true)
The code of my .m file is:
clear
clc
syms a b positive
%equations
f1(a,b)=sin(a+b)*cos(a)/b+a^2*tan(b);
%derivate to get the maximum
diff_f1=diff(f1, 'a');
diff_f2=diff(f1, 'b');
%solve for maximum
[a, b]=vpasolve([diff_f1, diff_f2], [a, b], 'random', true)
How can I set random true and get more solutions?
  1 个评论
Stephen
Stephen 2015-1-13
I don't even get the error free answer with the code provided by MATLAB online doc.
I checked my own documentation with R2013a. They didn't offer choice for "random". So I guess "random" is the R2014b thing?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by