How to create a long list using the same number?

16 次查看(过去 30 天)
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

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2014-7-23
编辑:Azzi Abdelmalek 2014-7-23
repmat(59,1000,1)
%or
59*ones(1000,1)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by