how pad zero in matlab after each element in a row of matrix?
3 ビュー (過去 30 日間)
古いコメントを表示
Shwetha Padmanabha
2019 年 11 月 3 日
回答済み: Walter Roberson
2019 年 11 月 3 日
a=ones(1,100)
need to pad 5 zeros after each element in row i.e 1 0 0 0 0 0 10 0 0 0 0 so on please help me i am new to matlab thanks in advance
0 件のコメント
採用された回答
KALYAN ACHARJYA
2019 年 11 月 3 日
編集済み: KALYAN ACHARJYA
2019 年 11 月 3 日
a=repmat([1 0 0 0 0 ],100)
%......................^ repeatation
Or
a=repmat([1 0 0 0 0 0],1,100);
You will get resultant array, which you are looking for , the resultabt will be 1x600, right?
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Numeric Types についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!