> Hi, I'm trying to read the numbers only from each line but without
> reading the ND or the commas.
> ND, 1, -0.0104594 -0.12456164 6.0715322E-017
> ND, 2, -0.0098119825 -0.12460658 -0.0013874772
> ND, 3, -0.0096356887 -0.11458401 -0.001629882
> With the numbers read, is it possible to sscanf them into another
> textfile and place the read numbers in this structure format?
> <node id="1">-0.0104594,-0.12456164,6.0715322E-017</node>
> <node id="2"> -0.0098119825,-0.12460658,-0.0013874772</node>
> <node id="3">0.0096356887,-0.11458401,-0.001629882 </node>
Use textscan() w/ 'delimiter',',' and skip the first field or use the 'treatasempty' parameter.
> On 9/24/2012 4:17 AM, summer8 wrote:
>> Hi, I'm trying to read the numbers only from each line but without
>> reading the ND or the commas.
>> ND, 1, -0.0104594 -0.12456164 6.0715322E-017
>> ND, 2, -0.0098119825 -0.12460658 -0.0013874772
>> ND, 3, -0.0096356887 -0.11458401 -0.001629882
>> With the numbers read, is it possible to sscanf them into another
>> textfile and place the read numbers in this structure format?
>> <node id="1">-0.0104594,-0.12456164,6.0715322E-017</node>
>> <node id="2"> -0.0098119825,-0.12460658,-0.0013874772</node>
>> <node id="3">0.0096356887,-0.11458401,-0.001629882 </node>
> Use textscan() w/ 'delimiter',',' and skip the first field or use the
> 'treatasempty' parameter.