I have installed Matlab r2010a on my computer
I need use the function xlsread to load data from one just one *.xls or *.xlsx file. that's not a big challenge, the problem is How to modify
xlsread.m to get a flag (integer) that gives the percentage of the loading process?
Thanks a lot.
so far i made this:
put a step variable to count until half then call
xlsread that take a little time and after load process, the counter in 49.5% count to the end.
Not the best, but this is what I have
file = 'example.xls'; h = waitbar(0, ['Loading data from ' file], ... 'Name', 'Loading',... 'CreateCancelBtn',... 'setappdata(gcbf, ''canceling'', 1)'); steps = 200; for step = 1 : steps %# Check for Cancel button press if getappdata(h, 'canceling') okCancel = 1; break end pause(0.01); %# Delay time for wait bar progres if step == steps/2 [data, txt] = xlsread(file); end %# Process status report waitbar(step/steps, h, sprintf(['Loading data from file... %3.2f%%'], step*100/steps)); end set(h, 'CloseRequestFcn', 'closereq') close(h)