symbolic calculation
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Why do I get
>> a = sqrt(sym(2))
a =
1/2
2
instead of
a = 2^(1/2)
And I got >> H = sym(hilb(2))
H =
[ 1. 0.500000000000000]
[ ]
[0.500000000000000 0.333333333333333]
instead of the fraction version. Is there any expert who can tell me how to set this? I use the mathlab 2010b.
0 comentarios
Respuesta aceptada
Walter Roberson
el 31 de Mzo. de 2011
evalin(symengine, 'PRETTYPRINT := FALSE');
I do not promise that it will work, though. If it doesn't, then
char(a)
should show you the linear form.
I don't know why the decimal form is given for the hilbert matrix. You could try, though,
evalin(symengine, 'linalg::hilbert(2)');
6 comentarios
Walter Roberson
el 31 de Mzo. de 2011
2010b cannot use Maple. If it doesn't know symengine, the implication would be that you do not have the symbolic toolbox, except then I would have expected it to fail on sym . I'm surprised you are getting anywhere with those commands if you don't have the symbolic toolbox.
Más respuestas (1)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!