Allen February 2016

Setting to get the pretty rational phrases in command window

Here I've a rational relation :

A =  -(2*omega*(5*omega^4 - 9907*omega^2 + 550))/(omega^6 + 5025*omega^4 + 3344500*omega^2 + 11902500)

Is there any setting in Matlab that shows computed results in command window 'like (A)' pretty as below form (both for numeric and parametric results):

          -(2*omega*(5*omega^4 - 9907*omega^2 + 550))
A = --------------------------------------------------------
      (omega^6 + 5025*omega^4 + 3344500*omega^2 + 11902500)

Answers


Stewie Griffin February 2016

You might want to check out pretty.

From the documentation:

pretty(X) prints symbolic output of X in a format that resembles typeset mathematics.

As an example:

        /   2       \
sqrt(3) | ---- + #2 | 1i
        \ 9 #2      /
------------------------
           2

I don't have the symbolic toolbox, so I can't illustrate with your example.

Post Status

Asked in February 2016
Viewed 2,084 times
Voted 7
Answered 1 times

Search




Leave an answer