Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news.aset.psu.edu!support1.mathforum.org!not-for-mail
From: AMK <kennaster@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: import uneven data file
Date: Fri, 23 May 2008 09:10:19 EDT
Organization: The Math Forum
Lines: 20
Message-ID: <7282774.1211548249862.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1211548249 31992 144.118.30.135 (23 May 2008 13:10:49 GMT)
X-Complaints-To: news@support1.mathforum.org
NNTP-Posting-Date: Fri, 23 May 2008 13:10:49 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:470037



Hi,
I would like to import a comma delimited file that takes the form:

file1:
115,1,2,3,4,5
101,1,2,3,4,5,6,7,8,9

Does a matlab command exist to do this?

ie. convert on-the-fly to this so the workspace can handle it?
115,1,2,3,4,5,nan,nan,nan,nan
101,1,2,3,4,5,6,7,8,9

Then create a variable of just the 115 rows and a variable of just the 101 rows?

x1 = 115,1,2,3,4,5,
x2 = 101,1,2,3,4,5,6,7,8,9

Thanks,
AMK