How to pad zeros to an array?

30 Ansichten (letzte 30 Tage)
Minu
Minu am 30 Mai 2013
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...

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 30 Mai 2013
Bearbeitet: Azzi Abdelmalek am 30 Mai 2013
A=[1 2 3 4 5]
A=[A zeros(1,5)]
%or
A(end+1:end+5)=0

Weitere Antworten (0)

Kategorien

Mehr zu Cell Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by