odd and even index in cell
19 ビュー (過去 30 日間)
古いコメントを表示
A={[113],[112],[42],[29],[113],[69],[86],[9],[0]};
B={[18],[14],[5],[39],[27],[11],[9],[7],[0]};
I want put even index in A to zero. New_A should be:
New_A={[113],[0],[42],[0],[113],[0],[86],[0],[0]}
Also put odd index in B to zero. New_B should be:
B={[0],[14],[0],[39],[0],[11],[0],[7],[0]};
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!