Create array with same number
359 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have this command z=ones(length(x),1) If I want to change (ones) with 2 or 3 what I should do?
0 Commenti
Risposta accettata
James Tursa
il 14 Set 2018
Modificato: James Tursa
il 14 Set 2018
See this link for a discussion of various methods to do this:
The fastest method seems to be
z = zeros(length(x),1) + 2;
0 Commenti
Più risposte (2)
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices 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!