Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
doubt in for Loop
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
Now i want to execute a formula;
if e+t<L
.......(some logic)
wherein the size of e= 8x1 doubt
t=28x1 doubt
L=8x1 doubt.
Is there anyway I can execute this line.
Please help.
댓글 수: 0
답변 (1개)
Walter Roberson
2020년 10월 8일
for K = 1 : numel(e)
if all(e(K) + t < L)
.......(some logic)
end
end
댓글 수: 4
Walter Roberson
2020년 10월 9일
The code I posted,
for K = 1 : numel(t)
if all(e + t(K) < L)
.......(some logic)
end
end
does not index e, so you will not get an error about the number of elements in e.
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!