how to duplicate rows in a 2D matrix
    6 ビュー (過去 30 日間)
  
       古いコメントを表示
    
hello everyone, for example I have an array like the one below, I want to duplicate the array value on row 2nd to the value on row 1st does anyone know the easy way? I have tried the code below but it still has an error, thank you
 A = magic(4);
 A(2,:) = [1,:];
 end
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Matrix Indexing についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

