How do I stop the calculation in a for loop?
이전 댓글 표시
Hello community!
First of all thanks for your help:)
n = 4;
v = rand(n,2);
for f = 1:1000
v = v-0.001
end
Thats already what I ve got. It gives me 1000 of matrixes back and alyways calculated by - 0.001. Now I ve got problem. If one element of the matrix (for example matrix Number 94) is already smaller than 0.001, then this element should be for all other matrixes ( 95 - 1000) equal to zero. I hope you have some advice! Thanks.
채택된 답변
추가 답변 (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!