How to change matrix?

1 次查看(过去 30 天)
Ayob
Ayob 2013-6-1
I have a 6*3 matrix and I want to change to 6*2 matrix, how can I do it?
example:
N1=[1 2 3;4 5 6]
then
N1=[1 2;4 5]

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-6-1
编辑:Azzi Abdelmalek 2013-6-1
N1=[1 2 3;4 5 6]
N1=N1(:,1:2) % : means all lines, and 1:2 means column 1 to 2

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by