How do i display all the values of this for loop?

조회 수: 14 (최근 30일)
SAI KARTHIK MYSORE MOULISWAR
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

채택된 답변

David Hill
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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by