make a vector from one value

77 vues (au cours des 30 derniers jours)
Lev Mihailov
Lev Mihailov le 21 Juil 2020
Modifié(e) : Bruno Luong le 21 Juil 2020
hello! I have values ​​0.421, I need to make a vector of 1200 values ​​of the same from it without a loop
% I need to do without a loop x=[​​0.421 ​​0.421 ​​0.421 ​​0.421 ...]

Réponse acceptée

Bruno Luong
Bruno Luong le 21 Juil 2020
Modifié(e) : Bruno Luong le 21 Juil 2020
One way (among many)
x = 0.421 + zeros(1,1200)

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by