creating variable of specified length and same values
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
John
el 15 de Nov. de 2013
Respondida: ES
el 15 de Nov. de 2013
Hi,
How could I create a 4x1 variable of the value 1.2?
For example
1.2
1.2
1.2
1.2
0 comentarios
Respuesta aceptada
Más respuestas (2)
Azzi Abdelmalek
el 15 de Nov. de 2013
Editada: Azzi Abdelmalek
el 15 de Nov. de 2013
a=1.2;
a=a(ones(1,4))
%or
a=repmat(1.2,1,4)
0 comentarios
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!