Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to force sybolic solve to give numeric output

Subject: how to force sybolic solve to give numeric output

From: krk

Date: 26 Jan, 2009 13:58:01

Message: 1 of 2

Hi all,

matlab help about (symbolic) solve states: "numeric solutions are returned if symbolic solutions cannot be determined."

I solve 4-eqs 4-unknowns set of algebraic equations. If I use (symbolic) solve it takes about 20 minutes to see the result which is numeric and consists of 28 solutions.
If I use MATHEMATICA I see the output in less then one second (15 solutions)

My question: is it possible that such long time of computation is a result
of MATLAB trying to first find a symbolic solution, then giving up and quickly
finding numeric approximation ? If yes, is there any way to force skipping
'symbolic phase' of the solver ? N.b., if I rewrite the system as a function
and use fsolve it converges quickly , but of course I get only one solution

best

krk

Subject: how to force sybolic solve to give numeric output

From: Alan Weiss

Date: 26 Jan, 2009 20:00:52

Message: 2 of 2

Hi, you might want to try the MuPAD solver
numeric::polysysroots
Access this with the MuPAD notebook interface, or use the MATLAB
functions evalin(symengine,'numeric::polysysroots(eqs,...)')
or feval(symengine,'numeric::polysysroots','eqs',...)

For more info, see
http://www.mathworks.com/access/helpdesk/help/toolbox/symbolic/brs6v40.html#brs6wd3

Alan Weiss
MATLAB mathematical toolbox documentation

krk wrote:
> Hi all,
>
> matlab help about (symbolic) solve states: "numeric solutions are returned if symbolic solutions cannot be determined."
>
> I solve 4-eqs 4-unknowns set of algebraic equations. If I use (symbolic) solve it takes about 20 minutes to see the result which is numeric and consists of 28 solutions.
> If I use MATHEMATICA I see the output in less then one second (15 solutions)
>
> My question: is it possible that such long time of computation is a result
> of MATLAB trying to first find a symbolic solution, then giving up and quickly
> finding numeric approximation ? If yes, is there any way to force skipping
> 'symbolic phase' of the solver ? N.b., if I rewrite the system as a function
> and use fsolve it converges quickly , but of course I get only one solution
>
> best
>
> krk

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us