How do i display all the values of this for loop?
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
SAI KARTHIK MYSORE MOULISWAR
am 13 Jan. 2020
Kommentiert: SAI KARTHIK MYSORE MOULISWAR
am 13 Jan. 2020
L = input('Enter the Length ');
ne= input('Enter Number of Elements ');
a=L/ne;
for b = 1:ne
c = 0 + (b)*a;
end
0 Kommentare
Akzeptierte Antwort
David Hill
am 13 Jan. 2020
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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!