![]() ![]() Right now, it outputs an iteration of 0 once I got rid of the errors. I have tried to code this, and I believe that the matrices are correct, and I think that the Gauss Seidel function is correct, but I am extremely confused on how to update the guess properly. First, I would like to know if my logic is right, and a pseduocode for this set up would be very helpful. My main confusion comes from how to accurately set this up together and with two different variables. I have before coded the Newton Raphson and Gauss Seidel methods before but separately. When the error is smaller than the tolerance, the values are reported. Each iteration has an error between the old and new guess.I will then plug in that updated x, find another h, and continue that process. First plug in my intital guesses for x into the first and last matrix, and then every time I solve for H, i'll add that stepsize to the previous guess of x to create a new x.Transfer the system so we have =, where H is what i am solving for. Linearize the system by finding the derivative of the equations and put into matrix.I need help figuring out how to incorporate Newton Raphson and Gauss Seidel methods to solve a nonlinear system of equations in Matlab.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |