How to pad zeros to an array?

92 次查看(过去 30 天)
Hi
I have an array of data of size 5.I have to pad zeros to set the size as 10.How to add zeros of size 5.Help me please...

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-5-30
编辑:Azzi Abdelmalek 2013-5-30
A=[1 2 3 4 5]
A=[A zeros(1,5)]
%or
A(end+1:end+5)=0

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by