This symbolic expression in Matlab
syms x y;
f = x * y * y
returns
f =
x*y^2
How can I stop Matlab from simplifying the expression and let it remain as x * y * y
?
I'm trying to print the steps of a calculation this way, so reordering the terms causes confusion.
A workaround that I can think of, is something like this:
str = 'f = x * y * y' ;
Then
eval(str);
will perform the operation you want and you can still use str for presenting it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With