f



problem with using waitbar while importing data

hi,all
this is my first thread in this newsgroup

I am doing a gui project now for data analysis
the data is stored in '.csv' format

first I need to import the data into the gui data by a
button callback, and when this is in progress, there is a
waitbar indicating the percentage of data readed
here is my thought:
first get the total line number of the data file,
then the importing can be realized by fgetl() in a loop
and use a parameter to record the line numbers already
readed,so the percent can be calculated ,like
line_readed/line_total

and here is the problem:
since the file is pure data,there is no header or other info
about th data, how can I get the 
total line number at the first place ?

thanks for attention
0
woopple (2)
10/11/2007 5:35:17 AM
comp.soft-sys.matlab 210999 articles. 13 followers. lunamoonmoon (258) is leader. Post Follow

1 Replies
450 Views

Similar Articles

[PageSpeed] 51

All waitbar does is to give a graphical indication of the 
progress if a task takes too long to finish. Don't use it 
unnecessarily. If you put it in a lengthy loop, the time 
it takes to update waitbar might be significant. 

If using csvread() can let you read the whole file in one 
statement, you might consider not to use waitbar at all. 
After the csvread(), you know the size of the data so you 
can put waitbar in your loop of data processing to 
indicate the progress.

"fee woo" <woopple@gmail.com> wrote in message <fekcmk$qs7
$1@fred.mathworks.com>...
> hi,all
> this is my first thread in this newsgroup
> 
> I am doing a gui project now for data analysis
> the data is stored in '.csv' format
> 
> first I need to import the data into the gui data by a
> button callback, and when this is in progress, there is a
> waitbar indicating the percentage of data readed
> here is my thought:
> first get the total line number of the data file,
> then the importing can be realized by fgetl() in a loop
> and use a parameter to record the line numbers already
> readed,so the percent can be calculated ,like
> line_readed/line_total
> 
> and here is the problem:
> since the file is pure data,there is no header or other 
info
> about th data, how can I get the 
> total line number at the first place ?
> 
> thanks for attention

0
Fangjun
10/18/2007 4:29:35 PM
Reply: