How to create a long list using the same number?

Simple question but can't find it anywhere. I need to make a long list of the number say, 59, a thousand times.
59
59
59
59 etc
What is the syntax to do this? Thanks

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 23 de Jul. de 2014
Editada: Azzi Abdelmalek el 23 de Jul. de 2014
repmat(59,1000,1)
%or
59*ones(1000,1)

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 23 de Jul. de 2014

Editada:

el 23 de Jul. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by