Set random true vpasolve

2 Ansichten (letzte 30 Tage)
Pavel
Pavel am 7 Mai 2014
Kommentiert: Stephen am 13 Jan. 2015
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 Kommentar
Stephen
Stephen am 13 Jan. 2015
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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by