Question

Can you help me to write a newton MATLAB code? I have half part of the...

Can you help me to write a newton MATLAB code? I have half part of the code and need to finish it. Thanks.

I gave up Thank you.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: If you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

clc%clears screen
clear all%clears history
close all%closes all files
format long
f = @(x) x.^2-10;
g=@(x) 2*x;
x0=2;
for i=1:100
x1=x0-f(x0)/g(x0);
if(abs(x1-x0)<1e-5)
break;
end
x0=x1;
end
disp('Root is');
disp(x1);

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Can you help me to write a newton MATLAB code? I have half part of the...
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
  • yes you will need matlab software Can someone please help me. attached is the exercise i...

    yes you will need matlab software Can someone please help me. attached is the exercise i am doing in matlab. also attached is the exercise that i am suppose to be doing.also attached is part a of my code and part b. also attached is an error code i am getting. can someone please help me with this. thanks. explain in detail what i am doing wrong and what i need to do to fix it. you use enogn polnts...

  • How to write this on matlab ? I have the code from maple .... please help...

    How to write this on matlab ? I have the code from maple .... please help me ... ASAP.... I a: 9 230:= ln ('a't k3 ) 6 C'B'CK]) (3012 ln('a'ck]) d3o Sa, ( ''k)) eso - Conc'a'ck)? SSEL : (enl' b'cic) – en c'a'ox))? SSET = 6 concate) Kat

  • MATLAB question I need the code exactly as you would write it in MATLAB. thank you...

    MATLAB question I need the code exactly as you would write it in MATLAB. thank you 1. Consider a Gaussian solution of the traveling-wave form ψ(z,t)-exp(-a(z-vt)2). The parameter values are a 1, 2. (a) Explain the physical meaning of these parameters (eg. what would happen if we took a = 10 instead?) Determine the direction of propagation of this solution: Is it traweling to the left or to the right? (2pts) (b) Write a Matlab code to plot the Gaussian...

  • Circuit Analysis: Need help writing this into MATLAB. I do not need it in paper I need help putting it into MATLAB. * DO NOT WRITE ON PAPER* Please use MATLAB and post your code. Thank you. My work c...

    Circuit Analysis: Need help writing this into MATLAB. I do not need it in paper I need help putting it into MATLAB. * DO NOT WRITE ON PAPER* Please use MATLAB and post your code. Thank you. My work completed. Please help me in make code for the above circuit ^. Here is my work for Part 3 that is needed to complete this part 4. ( could not solve the last part) Part 4. AC Solution by Phasor Analysis...

  • Image processing Matlab problem. Could you please help me to write a Matlab code to read...

    Image processing Matlab problem. Could you please help me to write a Matlab code to read images, equalize contrasts, covert images to grayscale and binary, then display on same windows. Then perform SOBEL and CANNY edge detection on images. Final make MATLAB to count the number of circles in images (circles and red circles) And how can we distinguish circles by color? and how to count number of red, green and blue circles separately for example.

  • Can someone help me figure out how to write code on Matlab for either of these...

    Can someone help me figure out how to write code on Matlab for either of these two questions? My biggest problem is working with the large factorials which Matlab can't seem to handle 1. Write a code to calculate nas a function of ga, when NA l300, 600, 3000, 6000, NB (200, 400, 2000, 4000), and g 100, plot them and try to find some tendency when N increases (hint: 4 plots). 2. Write a code to calculate the probability...

  • Hi, can someone help me obtain the Figure 1 graph using Matlab? I need to see...

    Hi, can someone help me obtain the Figure 1 graph using Matlab? I need to see the code how you do the DTFT in Matlab. Thanks! The impulse response of a discrete-time LTI (linear time-invariant) system is, h[n] = Sinna Refer to Table 5.2 in the textbook for the basic discrete-time Fourier transform pairs The frequency response of the LTl system is, H (ejo, Here, H(e") is periodic with period 2 Step 2 of 31 Sketch the frequency response of...

  • Need help with matlab code. If writing code out please make it where i can understand...

    Need help with matlab code. If writing code out please make it where i can understand and read it. I would prefer to see it in matlab form. Thanks Consider the RC Circuit shown below. Assume the excitation is a 10 kHz sine wave with amplitude of 1 volt. Derive expressions for the voltages across the resistor and the capacitor as time functions. Plot the voltages across the resistor and the capacitor over two periods using MATLAB and a reasonable...

  • Thank you to the ones who have tried to help me and I apologize for having...

    Thank you to the ones who have tried to help me and I apologize for having to repost this question. I'm having a hard time trying to comprehend coding. I am supposed to code a joke and punchline. The joke is:"why did the chicken cross the road?" And the punchline is: "The hen got on its nerves." Or any answer will do actually. I have two labels and one button to make it run. If anyone can help me understand...

  • I need help with this c++ code. This is my first computer science course. I have...

    I need help with this c++ code. This is my first computer science course. I have not learned arrays but I am learning vectors. I am also required to write this code without do loops or any other form of advanced coding technique. Please help me figure out this code using the basic coding techniques that you would find in an introduction to cs. Thank you for your help, I don't even know where to start :)

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