Loop around a toolbox
이전 댓글 표시
Dear community,
I have a question concerning the optimization toolbox.
I have used the optimization toolbox to solve a problem. And that is working fine so far.
Now, I would like to see the solutions for different input variables (let's say for values from 40 to 800) using a loop and store the solutions in a matrix.
The problem is, if I just wrap the editor in a loop (as I would do with usual code), I get an error.
I think MATLAB does not recognize that the "for N = 40:800" at the beginning of the editor and the "end" at the editor's end belong together.
Does somebody know a solution to this problem?
I really appreciate any help you can provide.
댓글 수: 3
Cris LaPierre
2023년 11월 30일
It would be helpful if you could share your code, as well as the full error message (all the red text).
Walter Roberson
2023년 11월 30일
Your function definition is inside your for N loop.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Fluid Dynamics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!