How do i display all the values of this for loop?
조회 수: 14 (최근 30일)
이전 댓글 표시
SAI KARTHIK MYSORE MOULISWAR
2020년 1월 13일
댓글: SAI KARTHIK MYSORE MOULISWAR
2020년 1월 13일
L = input('Enter the Length ');
ne= input('Enter Number of Elements ');
a=L/ne;
for b = 1:ne
c = 0 + (b)*a;
end
댓글 수: 0
채택된 답변
David Hill
2020년 1월 13일
for b = 1:ne
c = 0 + (b)*a%remove ;
end
or
c=zeros(1,ne);
for b = 1:ne
c(b) = 0 + (b)*a%remove ;
end
display(c);%all values stored and array
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!