MATLAB: How could I extract last column in a matrix if I don’t know the size of matrix

matrix manipulation

I want to select only last coloumn..because in my program the size of matices is change every time..these are some example of my matices
(150×23)
(150×34)
(150*41)
…etc

Best Answer

matrix(:,end)