フィルターのクリア

Insert values into an array

155 ビュー (過去 30 日間)
Joe Abraham
Joe Abraham 2012 年 7 月 5 日
A = [1 3 5 6 7 13]
I want to insert 0 in the 1st cell resulting in
A=[0 1 3 5 6 7 13]
Thanks

採用された回答

Walter Roberson
Walter Roberson 2012 年 7 月 5 日
A = [0 A]; %build new array
Or:
A(2:end+1) = A; %shift over and zero
A(1) = 0;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by