MATLAB: Super user friendly output for equations

friendlyuser

Where I am studying no one knows how to use matlab and lecturers can't read it so I was wondering can matlab do something like this
a=4; b=5; c=6
>> x=a+b/c
x
4+5/6
>> eval(x)
x
....
and could I apply this to function pretty

Best Answer

The "pretty" function is part of the symbolic toolbox. It looks to me as if you would want something like
syms a b c
x = a + b/c * 4 + sym('5/6');
pretty(x)
xval = subs(x, {a,b,c}, {4, 5, 6});
pretty(xval)
Related Question