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

Kevin Phung
Kevin Phung 2019년 10월 2일
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

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2019년 10월 2일
편집: Walter Roberson 2019년 10월 2일

0 개 추천

Put the code into a function that returns the sum of the three values, and then fzero() or fsolve() .

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

태그

Community Treasure Hunt

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

Start Hunting!

Translated by