f



Reading data file with text column

Hello,

Is anyone can read the following row?

1,06/05/2004,9:51:12,0.107,0.0834,31.064,0,0,17,0,26

I tried many ways like
fscanf(fid,'%d, %d/%d/%d,%d:%d:%d, %f, %f, %f, %f, %f, %f, %f,
%f',[11 1])

fscanf(fid,'%d, %10c,%s, %f, %f, %f, %f, %f, %f, %f, %f',[11 1])

.....

They never worked. Please save me out of this trap.

Thank you in advance.

Ciao,

Jee
0
jee.choi (1)
6/9/2004 11:48:30 AM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
371 Views

Similar Articles

[PageSpeed] 36

Put the line that you have posted in a file (e.g. Edit.dat)and try with that
command:

[n,d,m,y,h,m,s,a1,a2,a3,a4,a5,a6,a7,a8]=textread('Edit.dat','%d,%d/%d/%d,%d:
%d:%d,%f,%f,%f,%d,%d,%d,%d,%d')

bye
-- 
Alessandro Toso
Dipartimento di Ingegneria Aerospaziale
Politecnico di Milano

Tel +39 02 2399 8032
"Jee Hyun Choi" <jee.choi@samsung.com> wrote in message
news:eedfb1b.-1@webx.raydaftYaTP...
> Hello,
>
> Is anyone can read the following row?
>
> 1,06/05/2004,9:51:12,0.107,0.0834,31.064,0,0,17,0,26
>
> I tried many ways like
> fscanf(fid,'%d, %d/%d/%d,%d:%d:%d, %f, %f, %f, %f, %f, %f, %f,
> %f',[11 1])
>
> fscanf(fid,'%d, %10c,%s, %f, %f, %f, %f, %f, %f, %f, %f',[11 1])
>
> ....
>
> They never worked. Please save me out of this trap.
>
> Thank you in advance.
>
> Ciao,
>
> Jee


0
toso (5)
6/9/2004 12:08:18 PM
Reply: