iterative when have Loop
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Salam Al-Rubaye
el 2 de Oct. de 2019
Comentada: Salam Al-Rubaye
el 7 de Oct. de 2019
Dear,
I have to assume X and used the value in three For Loop and the sum of the results of the loops should be zero. In each loop, I have a numerical solution.
What is the best way to do iterative to Find X?
Thanks,
1 comentario
Kevin Phung
el 2 de Oct. de 2019
can you be more clear? What do you mean by 'assume x'? It sounded like x was a constant, but then you are trying to solve for it? What are the loops doing? Provide an example for clarification
Respuesta aceptada
Walter Roberson
el 2 de Oct. de 2019
Editada: Walter Roberson
el 2 de Oct. de 2019
Put the code into a function that returns the sum of the three values, and then fzero() or fsolve() .
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!