matrix manipulations of columns
2 views (last 30 days)
Show older comments
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
0 Comments
Accepted Answer
Azzi Abdelmalek
on 8 May 2013
Edited: Azzi Abdelmalek
on 8 May 2013
A=random('norm',3,0.2,100,100)
A(:,2:2:end)=ones(size(A(:,2:2:end)))
0 Comments
More Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!