For exemple if I have a matrix that is 3×3
1 1 1A = 1 1 1 1 1 1
I want to multiply elements with round indexes by 2 so it look like this:
1 2 1A = 2 1 2 1 2 1
indexindexingMATLAB
1 1 1A = 1 1 1 1 1 1
1 2 1A = 2 1 2 1 2 1
Best Answer