Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!h1g2000prh.googlegroups.com!not-for-mail
From: akshay bhat <akshayubhat@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: creating a sparse matrix from a file
Date: Sun, 4 May 2008 01:22:28 -0700 (PDT)
Organization: http://groups.google.com
Lines: 15
Message-ID: <2b89e1a3-a4f7-47ae-b8e0-571a8aa640d1@h1g2000prh.googlegroups.com>
NNTP-Posting-Host: 59.182.121.30
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1209889348 14679 127.0.0.1 (4 May 2008 08:22:28 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 4 May 2008 08:22:28 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: h1g2000prh.googlegroups.com; posting-host=59.182.121.30; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) 
Xref: news.mathworks.com comp.soft-sys.matlab:466488


i have a list in following form (in a csv file)
12,54
3,4
.
.
.
i trying to create a sparse matrix by using following code

smat(12,54)=1;

now the size of the list is around 1 million that is there are around
1million pairs.
a simple for loop is taking 30 minutes for 10 percent of of values.
is there any shortcut way for this.
to speed up the process?