Formatting Symbolic Output Display

In Matlab R2016a the output format that I get for a symbolic calculation is similar to PRETTYPRINT format. I would like to disable that and have a one-dimensional plain text as the output (i.e. "*" for multiplication "/" for division). I found the following sources when we use MuPAD. However, I am not using MuPAD and I would like to do the same thing using the Editor in Matlab. Note that my output does not have anything numeric so vpa commands do not work!

6 Comments

‘In Matlab R2016a the output format for a symbolic calculation is similar to PRETTYPRINT format.’
It isn’t for me in R2016a. I’m not aware that pretty can be set as a default format. Please post an example.
Giray
Giray on 24 Aug 2016
Edited: Giray on 24 Aug 2016
Here is a simple example:
>> syms x y z
>> solve((x^2*z + y), x)
ans =
[ 1/2 ]
[ (-z y) ]
[ --------- ]
[ z ]
[ ]
[ 1/2]
[ (-z y) ]
[- ---------]
[ z ]
In the earlier versions, for example, I would get: ((-z*y)^1/2)/z
This might be a problem to bring to the attention of MathWorks Technical Support.
When I do it, I get:
syms x y z
solve((x^2*z + y), x)
ans =
(-y)^(1/2)/z^(1/2)
-(-y)^(1/2)/z^(1/2)
Walter Roberson
Walter Roberson on 24 Aug 2016
Edited: Walter Roberson on 24 Aug 2016
Giray, which operating system are you using? (Just in case it is OS-specific) ?
Also, is it possible that you have Maple installed?
Giray
Giray on 24 Aug 2016
Edited: Giray on 24 Aug 2016
Walter, I am using 64-bit OS & Windows 10. I have Maple 2016 installed as well. Is it possible that Maple is causing this? Because I believe the symbolic calculation routine uses Maple as a toolbox.
Mathwork's Symbolic Toolbox uses MuPAD as its calculation engine, and has since R2008b if I recall correctly. However, if you happen to also own a copy of Maple then when you install Maple it will give you an option to install a symbolic toolbox that uses Maple as its engine. The formatting in such a case could be considerably different (and the available commands are not the same.)
Check by using
which solve
If you are using the MATLAB Symbolic toolbox then on OS-X the result would be
/Applications/MATLAB_R2016a.app/toolbox/symbolic/symbolic/solve.m

Sign in to comment.

Answers (0)

Asked:

on 24 Aug 2016

Commented:

on 24 Aug 2016

Community Treasure Hunt

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

Start Hunting!