MATLAB: How to retrieve data in column wise in Matlab

MATLABmatrix

A=ans(:,1) This gives the data only for 1st column from a table. Like wise I want to get the data of 4th column as well. How do I retrieve both 1st and 4th columns data in Matlab? What is the command for that?

Best Answer

A(:, [1 4])
Related Question