MATLAB Constructing a Loop in Matlab to Solve Polynomial Equations

AI Thread Summary
To solve multiple polynomial equations in Matlab by iteratively substituting values, a loop structure is essential. The discussion emphasizes the need to construct a loop that takes the initial variable values, solves the equations, and then replaces the original values with the new solutions for subsequent iterations. Users are encouraged to familiarize themselves with loop control keywords in Matlab, particularly referencing the MathWorks documentation to understand how to implement loops effectively. This approach allows for generating different solutions in each iteration based on the updated variable values.
jemma
Messages
35
Reaction score
0
Using Matlab, I have 4 polynomial equations which I can solve by substituting the starting values for the variables into the equations. However, I want to contruct a loop to then substitute the answer from the first round back into the equations to replace the orginal starting values, and do this multiple times to produce multiple answers (a different answer for every round in the loop). Any idea how I can do this? Thanks :)
 
Physics news on Phys.org
Start by reading about the various loop control keywords. Here's a good place to start - http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/getstart.pdf. Section 4.2, Loop Control, should help you get going.
 

Similar threads

Replies
5
Views
3K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
4
Views
2K
Replies
6
Views
2K
Replies
2
Views
2K
Back
Top