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" <firstname.lastname@example.org> wrote in message <fekcmk$qs7
> 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
> and here is the problem:
> since the file is pure data,there is no header or other
> about th data, how can I get the
> total line number at the first place ?
> thanks for attention