Effacer les filtres
Effacer les filtres

How can we create a vector of length n

89 vues (au cours des 30 derniers jours)
Omar B.
Omar B. le 19 Sep 2019
Commenté : Omar B. le 19 Sep 2019
Hello,
How can we write in Matlab vector u= [1/10 ,1/10 ,..., 1/10] where u \in{R}^{200}

Réponse acceptée

James Tursa
James Tursa le 19 Sep 2019
Modifié(e) : James Tursa le 19 Sep 2019
There are many ways of doing this. E.g., use the ones( ) function and divide by 10. Or use the zeros( ) function and add 1/10. Or use the repelem( ) function. Etc.
  2 commentaires
Bruno Luong
Bruno Luong le 19 Sep 2019
1/10+zeros(1,200)
1/10*ones(1,200)
Omar B.
Omar B. le 19 Sep 2019
Thank you so much

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by