How to pad zeros to an array?

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일

1 개 추천

A=[1 2 3 4 5]
A=[A zeros(1,5)]
%or
A(end+1:end+5)=0

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 App Building에 대해 자세히 알아보기

태그

질문:

2013년 5월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by