Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: delete column with known col indices
Date: Sat, 13 Jun 2009 05:58:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <h0vf59$nk3$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1244872681 24195 172.30.248.37 (13 Jun 2009 05:58:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 13 Jun 2009 05:58:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1875128
Xref: news.mathworks.com comp.soft-sys.matlab:547115


Hi
I want to delete several columns in a matrix and get the resulting matrix without using loops, what is the fastest way to do this. I saw some posts but didn't understand them.

For example
1 2 3 4 5
6 7 8 9 10

I want to delete columns [1 3] and get
2 4 5
7 9 10

what is the fastest way to do this.

Thanks
Diego