repmat
20 ビュー (過去 30 日間)
古いコメントを表示
i try to create an array as following by using repmat() function:
i have h array
h = [1 2 3 4 5]
and i want to carry out this:
h2 = [1 1 2 2 3 3 4 4 5 5]
by using repmat() func. i want to make each element of this array(h) double like in h2... please help me out ...
0 件のコメント
採用された回答
Matt Fig
2011 年 3 月 22 日
N = 2; % The number of times each element will repeat...
h2 = reshape(repmat(h,N,1),1,N*length(h))
4 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!