Rank: 84838 based on 0 downloads (last 30 days) and 0 file submitted

Yuan Ren


Personal Profile:


Watch this Author's files


Comments and Ratings by Yuan Ren
Updated File Comments Rating
31 Oct 2009 xml_io_tools Read XML files into MATLAB struct and writes MATLAB data types to XML Author: Jaroslaw Tuszynski

I think there's some problem in this part:

digits = '[Inf,NaN,pi,\t,\n,\d,\+,\-,\*,\.,e,i, ,E,I,\[,\],\;,\,]';
s = regexprep(str, digits, ''); % remove all the digits and other allowed characters

I found this when one of my LeafNode called "IN" was recognized as "NaN".

I suggest the following modification.

>> regexprep('IN','[Inf,NaN]','')

ans =


>> regexprep('IN','(Inf)|(NaN)','')

ans =


One other thing is "num = str2num(str)" is a somewhat dangerous function. I'm not sure if it worth it to use this to provide some fancy functionality.

Contact us