Path: news.mathworks.com!not-for-mail
From: "zedong 
" <zdongwu@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: A problem about  sparse matrix
Date: Thu, 1 Jan 2009 12:39:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 7
Message-ID: <gjidh6$e25$1@fred.mathworks.com>
Reply-To: "zedong 
" <zdongwu@gmail.com>
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 1230813542 14405 172.30.248.37 (1 Jan 2009 12:39:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 1 Jan 2009 12:39:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1639198
Xref: news.mathworks.com comp.soft-sys.matlab:509405


I now have a matrix  It's a matrix I want to do the following thing:
A is a sparse  matrix.for example n by n
rowcolumindex is an vector which store some index of A.My code is like this:
A(rowcolumindex,:)=0;
A(rowcolumindex,rowcolumindex)=speye(length(rowcolumindex));%You can understand I want to set the rows rowcolumindex be a eye matrix.
But I find it's no efficiency.Because after the first row code that A(rowcolumindex,:) now become a full matrix,I think. Am I right?Any efficiency implementation