Question
How do you do this on Matlab?
Question 3
Problem 3 (25) G a function f(r) coatmtous at X = 25 And the pos iive root. Manually. by hatd, conduct the Secant method usin
0 0
Add a comment Improve this question Transcribed image text
Answer #1

3. MATLAB Program to solve the given problem and plot the function:

clc;clear;
f= @(x)0.2*(x-5).^3-0.01*x+10; % function definition
x(1)=1.425; % initial guess
x(2)=1.775; % initial guess
for n = 2:5 %% number of iterations
x(n+1)=x(n)-f(x(n))*(x(n)-x(n-1))/(f(x(n))-f(x(n-1)))
end
x = 1.425:0.05:1.775;
plot(x,f(x))

Output of the program:

Breakpoints Run Run and Figure X Advance EDIT RUN BREAKPOINTS File Edit View Insert Tools Desktop Window Help Editor C:Users

We can see that the solution converges to x = 1.3176.

Add a comment
Know the answer?
Add Answer to:
How do you do this on Matlab? Question 3 Problem 3 (25) G a function f(r)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT