How do i set a cut off point for for loops?
조회 수: 2 (최근 30일)
이전 댓글 표시
I am working on a structural analysis problem for a beam with two loads and need to plots deflections based off the loads. I have two for loops set up so the loads can vary and need to end the for loops when the deflection is 1/100 of the beams length (L/100).
댓글 수: 0
답변 (1개)
Audrey
2015년 2월 6일
You can use the command "break" to exit out of a for loop. So, something like:
for ii=1:x
...
if deflection>L/100
break;
end
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 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!