creating variable of specified length and same values
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
How could I create a 4x1 variable of the value 1.2?
For example
1.2
1.2
1.2
1.2
0 Commenti
Risposta accettata
Più risposte (2)
Azzi Abdelmalek
il 15 Nov 2013
Modificato: Azzi Abdelmalek
il 15 Nov 2013
a=1.2;
a=a(ones(1,4))
%or
a=repmat(1.2,1,4)
0 Commenti
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB 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!