creating variable of specified length and same values
6 次查看(过去 30 天)
显示 更早的评论
Hi,
How could I create a 4x1 variable of the value 1.2?
For example
1.2
1.2
1.2
1.2
0 个评论
采纳的回答
更多回答(2 个)
Azzi Abdelmalek
2013-11-15
编辑:Azzi Abdelmalek
2013-11-15
a=1.2;
a=a(ones(1,4))
%or
a=repmat(1.2,1,4)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!