Taking 100 seconds to Creatworkbook, why is that?

2 次查看(过去 30 天)
Dear all,
When I am using Matlab on my own laptop, everytime when I try to run the following code:
% load data
data = readtable('John.xlsx');
% extract series from the whole dataset
spspot = data(:,2);
logspspot = log(spspot{:,1});
djspot = data(:,3);
logdjspot = log(djspot{:,1});
nyspot = data(:,4);
lognyspot = log(nyspot{:,1});
spfut = data(:,5);
logspfut = log(spfut{:,1});
% Group the corresponding data series
grp1 = [logdjspot logspfut];
grp2 = [logspspot logspfut];
grp3 = [lognyspot logspfut];
It would take 100+ seconds, out of these time, 100 seconds are devoted to "CreateWorkbook" which is presented in the screenshot attached. I am sure it is not the problem with the Excel spreadsheet nor the data, as these code can be run very easily on the University's pc.
Thanks everyone in advanced for helping!
436485237.jpg
583698491.jpg
1921430028.jpg
  1 个评论
Image Analyst
Image Analyst 2019-6-17
Are you calling xlswrite() a bunch of times, because that could cause it to take a long time.

请先登录,再进行评论。

回答(0 个)

产品


版本

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by