How do you set entries in a matrix for odd rows with odd columns to zero?
4 views (last 30 days)
Show older comments
L'O.G. on 15 Feb 2023
Answered: Dyuman Joshi on 15 Feb 2023
I want to set A(i,j) = 0 if both i and j are odd. Is this possible to do vectorially?
Dyuman Joshi on 15 Feb 2023
%random data for example
A = rand(6,7)
More Answers (0)
Find more on Creating and Concatenating Matrices 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!