Iteratively solving equations in MATLAB

51 visualizaciones (últimos 30 días)
Elina Park
Elina Park el 15 de Sept. de 2021
Respondida: tamara el 26 de Mzo. de 2023
Hello! I'm trying to solve an equation iteratively using MATLAB.
If I have an equation such as a - mx^2 + b = 0, where all variables except x is defined, how do I set up an iterative loop so that the program finds a value of x? I think I'm supposed to use a for or while loop to do this, but I'm not sure how to set it up and define the accuracy/limit of the variable I'm trying to find. Thank you!

Respuestas (2)

Sreedhar Arumugam
Sreedhar Arumugam el 15 de Sept. de 2021
You can find a similar MATLAB answer to solving a polynomial equation using iteration here.
There's another answer that uses iteration to solve a trigonometric equation. While the equation is a bit different from yours, you can refer to this to understand the code and the method being used .

tamara
tamara el 26 de Mzo. de 2023
d^2T/dx^2-hp/KAc(T-Ta)=0

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by