Finding a single root of x^(3.6)=75

5 views (last 30 days)
Sarah Elena Aiko Johnson
Sarah Elena Aiko Johnson on 4 Oct 2022
Commented: Steven Lord on 4 Oct 2022
Hi, the question is to use MATLAB to determine the real root of x^3.6 = 75. I thought I could use the fzero code and wrote this code below but I keep getting an error and can't figure out why or if this is how I should approach this question.
fun = x^(3.6)-75;
x0=3;
z = fzero(fun,x0)
can anyone help?
  3 Comments
Sarah Elena Aiko Johnson
Sarah Elena Aiko Johnson on 4 Oct 2022
okay thank you! Im new to the forum.

Sign in to comment.

Answers (1)

James Tursa
James Tursa on 4 Oct 2022
Edited: James Tursa on 4 Oct 2022
Make a function handle with the @ operator. E.g.,
fun = @(x) x^(3.6)-75;
x0=3;
z = fzero(fun,x0)
z = 3.3178
Check
z^3.6
ans = 75
Or you can raise both sides of original equation to (1/3.6) power to solve for x directly.
Or you can solve directly using log( ) function as Benjamin suggests. (Followed up by using the exp( ) function)
  1 Comment
Steven Lord
Steven Lord on 4 Oct 2022
There are also the nthroot and realpow functions.
nthroot(75, 3.6)
ans = 3.3178
realpow(75, 1/3.6)
ans = 3.3178

Sign in to comment.

Categories

Find more on Exponents and Logarithms in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!