How to get only real output from (-3)^(1/3)
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Apurbo Roy Chowdhury
el 22 de Ag. de 2021
Comentada: Apurbo Roy Chowdhury
el 23 de Ag. de 2021
(-3)^(1/3)
I need the ans: -1.44224957.
0 comentarios
Respuestas (2)
Steven Lord
el 22 de Ag. de 2021
You can use the nthroot function.
y = nthroot(-3, 3)
2 comentarios
Walter Roberson
el 22 de Ag. de 2021
... I went looking for that, as I thought I remembered it existing. It is not mentioned in the documentation for power() or realroot() .
Walter Roberson
el 22 de Ag. de 2021
format long g
syms x
solve(x^3==-3 & imag(x) == 0)
double(ans)
Ver también
Categorías
Más información sobre Number Theory en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!