How to cut a matrix

29 次查看(过去 30 天)
smit g
smit g 2012-11-11
suppose I have a matrix [1 2 3 4 5; 6 7 8 9 0; 2 4 6 7 8]
now i want to cut and have the matrix [3 4 5; 8 9 0; 6 7 8] what should i do??
  4 个评论
Jan
Jan 2012-11-12
编辑:Jan 2012-11-12
1000s of assignments in a few days?! This system does not allow to learn efficiently. Surely you will not remember anything you can answer now in 2 years (or to be exact: anything the forum can answer). Using the holidays to read the documentation is a bad idea also: The brain needs vacations for a general brush-up.
I'm not convinced, that your college is a good preparation for the real live in a scientific community. So I wish you the very best and good luck. Please let your children visit a different college.
Camilo Malagon-Nieto
It is a valid question. I am using Matlab for quite some time and I just forgot how to do it. and I prefer to search here that go to the library, loan a MatLab book, look for the answer in the many chapters.... and so on.

请先登录,再进行评论。

采纳的回答

Wayne King
Wayne King 2012-11-11
编辑:Wayne King 2012-11-11
Let
A = [1 2 3 4 5; 6 7 8 9 0; 2 4 6 7 8];
B = A(:,3:end);
  2 个评论
smit g
smit g 2012-11-11
thanks......
Wouter
Wouter 2017-5-15
This solution, though simple, forces matlab to copy all the remaining elements through the memory. Is there no more memory-friendly solution for large matrices to chop columns out of A without copying the remaining elements?

请先登录,再进行评论。

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by