How can I shift a vector numerically to the right (or the left) by adding zeros to the side of the array?

16 ビュー (過去 30 日間)
Supposing I have a vector x=[1 2 3] and I need it to shift it to the right of two integers how can i generate a new vector x1=[0 0 1 2 3]

採用された回答

madhan ravi
madhan ravi 2019 年 8 月 13 日
x1=[zeros(1,2),x]

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by