MATLAB Answers

How to get only real value for equation?

4 views (last 30 days)
Sakshi Tak
Sakshi Tak on 30 Oct 2020
Edited: Ameer Hamza on 30 Oct 2020
The following equation of z has three answers (one real and two imaginary). So, how to get real value only?
y = 0.6447;
z = (y-1)^(1/3)

  0 Comments

Sign in to comment.

Accepted Answer

Ameer Hamza
Ameer Hamza on 30 Oct 2020
Edited: Ameer Hamza on 30 Oct 2020
Use nthroot() command
y = 0.6447;
z = nthroot(y-1, 3)

  0 Comments

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by