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:
solve in R2008b; absolutely no solution?

Subject: solve in R2008b; absolutely no solution?

From: Joerg Buchholz

Date: 28 Nov, 2008 11:04:01

Message: 1 of 7

In R2008b

>> solve ('abs(x) = x^2')

does not come to a solution at all. Matlab is busy, busy, busy, and busy ...

In R2007b:

>> solve ('abs(x) = x^2')
 
ans =
 
  0
  1
 -1

Obviously, R2008b's MuPAD-Matlab-Interface has quite a hard time trying to interpret the "complex" result MuPAD is trying to communicate to Matlab:

matrix([[x]]) in {matrix([[0]])} union solvelib::Union(Dom::ImageSet(x + y*I, x, R_ intersect RootOf(X82^3 + y*X82^2*3*I - X82*(3*y^2 + 1) + y*I - y^3*I, X82)), y, R_) intersect ({matrix([[0]])} union solvelib::VectorImageSet(matrix([[(-1)^(1/4)*(x + y*I)^(1/2)]]), [x, y], [R_, Dom::Interval(-infinity, 0)]) union solvelib::VectorImageSet(matrix([[-(-1)^(1/4)*(x + y*I)^(1/2)]]), [x, y], [R_, Dom::Interval(-infinity, 0)]))

I feel like the poor MuPAD-Matlab-Interface developers still have a long, long road to go ... ;-)

Subject: solve in R2008b; absolutely no solution?

From: Husam Aldahiyat

Date: 28 Nov, 2008 11:14:02

Message: 2 of 7

Put MATLAB 2007b in a .dll and call it in MATLAB 2008b to solve said problem.

Seriously though, calling out MuPad shortcomings is old news now.

Subject: solve in R2008b; absolutely no solution?

From: Joerg Buchholz

Date: 28 Nov, 2008 11:38:01

Message: 3 of 7

"Husam Aldahiyat" <numandina@gmail.com> wrote in message <ggojpq$72l$1@fred.mathworks.com>...
> Put MATLAB 2007b in a .dll and call it in MATLAB 2008b to solve said problem.
>
> Seriously though, calling out MuPad shortcomings is old news now.

You do not have to read my messages.

Subject: solve in R2008b; absolutely no solution?

From: Alan Weiss

Date: 28 Nov, 2008 13:07:53

Message: 4 of 7

Joerg Buchholz wrote:
> In R2008b
>
>>> solve ('abs(x) = x^2')
>
> does not come to a solution at all. Matlab is busy, busy, busy, and busy ...
>
> In R2007b:
>
>>> solve ('abs(x) = x^2')
>
> ans =
>
> 0
> 1
> -1
>
> Obviously, R2008b's MuPAD-Matlab-Interface has quite a hard time trying to interpret the "complex" result MuPAD is trying to communicate to Matlab:
>
> matrix([[x]]) in {matrix([[0]])} union solvelib::Union(Dom::ImageSet(x + y*I, x, R_ intersect RootOf(X82^3 + y*X82^2*3*I - X82*(3*y^2 + 1) + y*I - y^3*I, X82)), y, R_) intersect ({matrix([[0]])} union solvelib::VectorImageSet(matrix([[(-1)^(1/4)*(x + y*I)^(1/2)]]), [x, y], [R_, Dom::Interval(-infinity, 0)]) union solvelib::VectorImageSet(matrix([[-(-1)^(1/4)*(x + y*I)^(1/2)]]), [x, y], [R_, Dom::Interval(-infinity, 0)]))
>
> I feel like the poor MuPAD-Matlab-Interface developers still have a long, long road to go ... ;-)

Hi, I believe the reason MATLAB is having a hard time is that the MuPAD
engine assumes by default that symbolic variables are complex. If you
want to look for real answers, then it works better to tell the engine
that is what you want. For your example:

syms x real
solve('abs(x) = x^2')

ans =

   0
   1
  -1

Alan Weiss
MATLAB mathematical toolbox documentation

Subject: solve in R2008b; absolutely no solution?

From: Joerg Buchholz

Date: 28 Nov, 2008 13:17:01

Message: 5 of 7

> Hi, I believe the reason MATLAB is having a hard time is that the MuPAD
> engine assumes by default that symbolic variables are complex. If you
> want to look for real answers, then it works better to tell the engine
> that is what you want. For your example:
>
> syms x real
> solve('abs(x) = x^2')
>
> ans =
>
> 0
> 1
> -1
>
> Alan Weiss
> MATLAB mathematical toolbox documentation

Didn't Maple assume variables to be complex, too?

Subject: solve in R2008b; absolutely no solution?

From: Walter Roberson

Date: 28 Nov, 2008 18:03:13

Message: 6 of 7

Husam Aldahiyat wrote:
> Put MATLAB 2007b in a .dll and call it in MATLAB 2008b to solve said problem.

The 2007b symbolic toolbox is not eligible for deployment; and it would be
against the Terms of Use to create a dll that essentially just provided
command line access to Matlab without "added value". You can read the Terms of Use
for yourself by going to the very bottom of any of the right-hand-side pages in
the Matlab documentation viewer and clicking there on the Terms of Use link.
 
> Seriously though, calling out MuPad shortcomings is old news now.

I, for one, was unaware that it broke down in such simple calculations.
It -appears- to be defective to the point where it should be recalled; or
free upgrades made available (for several generations of the toolbox --
and several generations of Matlab too if the interface between the
two is faulty) until it meets "implied merchantability" tests.


Do you use any of the toolboxes? The Image Processing Toolbox, say? If you
found that it produced absolutely completely wrong answers on simple cases
when previously it had been thought it only broke on much more complicated cases,
would you be shrugging and saying "We're tired of hearing about this" ?



--
.signature note: I am now avoiding replying to unclear or ambiguous postings.
Please review questions before posting them. Be specific. Use examples of what you mean,
of what you don't mean. Specify boundary conditions, and data classes and value
relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?

Subject: solve in R2008b; absolutely no solution?

From: Husam Aldahiyat

Date: 29 Nov, 2008 05:43:02

Message: 7 of 7

Walter Roberson wrote in message .
> > Put MATLAB 2007b in a .dll and call it in MATLAB 2008b to solve said problem.
>
> The 2007b symbolic toolbox is not eligible for deployment; and it would be
> against the Terms of Use to create a dll that essentially just provided
> command line access to Matlab without "added value". You can read the Terms of Use
> for yourself by going to the very bottom of any of the right-hand-side pages in
> the Matlab documentation viewer and clicking there on the Terms of Use link.
>

I wasn't being serious. Wasn't it obvious by the "seriously though" that followed? Putting MATLAB in a .dll and calling it out in full in a future version is a funny thought though. Makes the mind boggle hehe.

> > Seriously though, calling out MuPad shortcomings is old news now.
>
> I, for one, was unaware that it broke down in such simple calculations.
> It -appears- to be defective to the point where it should be recalled; or
> free upgrades made available (for several generations of the toolbox --
> and several generations of Matlab too if the interface between the
> two is faulty) until it meets "implied merchantability" tests.
>
>
> Do you use any of the toolboxes? The Image Processing Toolbox, say? If you
> found that it produced absolutely completely wrong answers on simple cases
> when previously it had been thought it only broke on much more complicated cases,
> would you be shrugging and saying "We're tired of hearing about this" ?
>

Breaking down in the equation shown is not more serious than its breaking down in the other articles and posts from before. It's doubtful that the developers behind this new feature didn't test it to a competent degree, and now it seems it's not a matter of giving up on MuPad, but rather learning to get accustomed to its syntax restrictions.

Some guy answered the question and solved the problem anyway. Just declare it real, what's hard about that? If Symbolic toolbox 1 couldn't solve this without declaring it real no one would be complaining.

Don't know about everyone else, but the problem presented in this thread is far less severe than this

int(’arctan(x)/x^(3/2)’,0,1)
2008b: Warning: Explicit integral could not be found.

Which was mentioned ages ago.

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