フィルターのクリア

How to pad zeros to an array?

43 ビュー (過去 30 日間)
Minu
Minu 2013 年 5 月 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 Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by