How do i display all the values of this for loop?
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
SAI KARTHIK MYSORE MOULISWAR
il 13 Gen 2020
Commentato: SAI KARTHIK MYSORE MOULISWAR
il 13 Gen 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 Commenti
Risposta accettata
David Hill
il 13 Gen 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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!