Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: limit of str2double
Date: Thu, 27 Dec 2012 07:15:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <kbgsht$aev$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1356592509 10719 172.30.248.46 (27 Dec 2012 07:15:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 27 Dec 2012 07:15:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3941442
Xref: news.mathworks.com comp.soft-sys.matlab:785458

 I used this code to read a csv file of medical coded data.

f = fopen('input.dat');
 A=[];
 while ~feof(f)
    l = fgetl(f);
    r = regexp(l, ',', 'split');
    A(end+1,:) = str2double(r);
 end
 fclose (f);
 A 
this code read the file well but I have also some data in this form e.g 234, 2344, V567,V1528,.. within one row
here this code also give me NaN for all 'V' CODED values apart from missing values.
str2double is not handling such codes.