What command will erase all but the first three columns of a matrix in MATLAB? -


I'm essentially trying to get the matrix, a , and change it into matrix I have the values ​​in the first three columns of a I just want to sort out a in my first three columns.

  newMatrix = oldMatrix (:, 1: 3)  

It says, "I have a matrix called the old matrix. I want to store a subset of that matrix in a new matrix" and the brackets say what you want. The first colon represents "all the rows" and is a symbol of 1: 3 "column 1 to 3".


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -