How can I make a vector divide 1 by increasing numbers?
Afficher commentaires plus anciens
how can I generate a vector with values 1,1/2,1/3...1/10?
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 21 Juil 2019
i = 1;
while i <= 10
v(i) = 1./i;
i = i + 1;
end
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!