MATLAB: How to replace the 5 in the vector with decreasing numbers like 5,4,3,2,1

MATLABvectors

x(3:4,3:5) = 5

Best Answer

x(3:4,3:5) = reshape(5:-1:0, 2, 3);
Related Question