|
|
Re: reading text file line by line
Posted:
Aug 3, 2012 10:36 PM
|
|
dpb <none@non.net> wrote in message <jvhrcd$cbp$1@speranza.aioe.org>... > On 8/3/2012 6:15 PM, Leyo Joseph wrote: > ... > > >> fid=fopen('yourfile','rt'); > >> a=fgetl(fid); > >> while ~feof(fid) > >> l=fgetl(fid); > >> if ~isempty(l) > >> a=strvcat(a,l); > >> end > >> end > >> c=cellstr(a); > >> > > Thanks for thr help... I am getting closer, but need one more analysis. > > When I try the above, for example , I get c(5,1) > > > > ans = > > ' 0x3029 0x04548ecf' > > > > how to copy 0x04548ecf from c(5,1) to a variable?. I wan to do this for > > other (c:,1) > > In what form do you want the result? > > If you're looking for the numeric value use hex2dec() > > - I think, I didn't explain it well. How to take out 0x04548ecf from c(1,5) (C(1,5) is ' 0x3029 0x04548ecf' ) Once I take out 0x04548ecf I can connvert to dec and assign to a varaible.
|
|