how to crreate an array
3 ビュー (過去 30 日間)
古いコメントを表示
lets say i have an array x=[1 0 1] how can i sample every bit 10 times. output will be 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1
0 件のコメント
採用された回答
Star Strider
2017 年 11 月 5 日
編集済み: Star Strider
2017 年 11 月 5 日
Try this:
x=[1 0 1];
N = 10;
Output = reshape(repmat(x(:)', N, 1), 1, [])
2 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!