Path: news.mathworks.com!not-for-mail
From: "Sachitha Obeysekara" <sachitha.2.obeysekara@gsk.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: seperating numbers from a cell array
Date: Tue, 31 Jul 2007 11:09:28 +0000 (UTC)
Organization: GSK
Lines: 18
Message-ID: <f8n597$dp0$1@fred.mathworks.com>
References: <f8kh7u$dll$1@fred.mathworks.com> <1185795493.093689.11280@o61g2000hsh.googlegroups.com>
Reply-To: "Sachitha Obeysekara" <sachitha.2.obeysekara@gsk.com>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1185880168 14112 172.30.248.35 (31 Jul 2007 11:09:28 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 31 Jul 2007 11:09:28 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1069567
Xref: news.mathworks.com comp.soft-sys.matlab:421834


thanks

here's what i'm using:

regEx = '%s';
for i = 1:(numFieldsOut-1)
    regEx = [regEx '%n'];
end

b=textscan(b,regEx,'delimiter',',');

output = '[';
for i = 2:numFieldsOut
    output = [output 'b{1,' num2str(i) '} '];  
end
output = [output ']'];

output = eval(output);