matrix manipulations of columns

1 回表示 (過去 30 日間)
Charlene
Charlene 2013 年 5 月 8 日
How can I replace all even columns of matrix A by columns of ones.
pls note that matrix A is A=random('norm',3,0.2,100,100)
thx

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 5 月 8 日
編集済み: Azzi Abdelmalek 2013 年 5 月 8 日
A=random('norm',3,0.2,100,100)
A(:,2:2:end)=ones(size(A(:,2:2:end)))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by