dpb
Posts:
6,677
Registered:
6/7/07
|
|
Re: text file data into matrix format
Posted:
Dec 12, 2012 10:48 AM
|
|
On 12/12/2012 9:37 AM, ali wrote: ...
> After 450 lines the format of the lines become > x=-113, y= 454, z= 37 > > Which shows the space between = sign and the number is filled up with > signs. I tried strfind but did not work > > Now I want your advice about the general solution of this text file ...
use a format string that matches...
fmt=['x=%f, y=%f, z=%f'];
[x,y,z]=textread('yourfile.nam',fmt);
Or, textscan to return a cell...
--
|
|