MATLAB: How p(:,j) differs from p(j,:)

MATLAB

I often see people using these,
how p(:,j) differs from p(j,:)?

Best Answer

p=[1 2;3 4;5 6]
check this
p(:,2)
p(3,:)
p(:,2) means all lines, column number 2, p(3,:) means all columns, line number 3
Related Question