matrix manipulations of columns

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by