Mupad or Matlab : Expanding in a special way

Hello everyone I have a symbolic equation that I like to change its format as I shown in the picture below:
As you can see I like to sort it by the frequency I tried to use Mupad toolbox=> I couldn't finally make it right. Any idea...?

Risposte (1)

Walter Roberson
Walter Roberson il 6 Gen 2016
You can expand() and you can collect() terms in a limited way.
However, the symbolic toolkit works algebraically, and tends to arrange expressions for its own convenience, which might or might not be any particular order that you ever used. It tends to arrange subexpressions in whatever order it it first saw (or calculated) them in, so for example if you had calculated y + x at one point then if you entered or calculated x + y at a later point it might rewrite that as y + x. Or it might not. If you need your terms in a particular order, you should use a list (or a symbolic object)

Richiesto:

il 6 Gen 2016

Risposto:

il 6 Gen 2016

Community Treasure Hunt

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

Start Hunting!

Translated by