MATLAB: Traversing an image matrix columnwise

MATLABtraversing an image matrix columnwise

Hi guys i wanna traverse a matrix of an image column wise ie. it should consider first column and visit all the rows of that column and so on using for loops. Plz help me if u know the logic or code.

Best Answer

If I understand your question, the solution is a nested for loop along the lines of
[rows,cols] = size(Matrix);
for col = 1:cols
for row = 1:rows
work with Matrix(row,col);
end
end
Related Question