Matlab 每隔60分钟,定时器功能是否可以用来模拟其他功能?

Matlab 每隔60分钟,定时器功能是否可以用来模拟其他功能?,matlab,timer,infinite-loop,Matlab,Timer,Infinite Loop,在我的代码中,我需要在两天内每隔60分钟模拟一次我的matlab代码。我必须从url中检索特定数据。目前,我已经想出了如何做到这一点 xdom = xmlread('http://api.met.no/weatherapi/locationforecast/1.9/?lat=53.05;lon=4.8;msl=1'); cloudtags = xdom.getElementsByTagName('cloudiness'); cloudiness = cell(cloudtags.get

在我的代码中,我需要在两天内每隔60分钟模拟一次我的matlab代码。我必须从url中检索特定数据。目前,我已经想出了如何做到这一点

     xdom = xmlread('http://api.met.no/weatherapi/locationforecast/1.9/?lat=53.05;lon=4.8;msl=1');
cloudtags = xdom.getElementsByTagName('cloudiness');
cloudiness = cell(cloudtags.getLength, 2); 
for item = 1 : cloudtags.getLength
   cloudtag = cloudtags.item(item - 1);
   timetag = cloudtag.getParentNode.getParentNode;
   cloudiness{item, 1} = char(timetag.getAttribute('from'));
   cloudiness{item, 2} = str2double(cloudtag.getAttribute('percent'));
end
cloudiness;
 matchrow = strcmp(cloudiness(:, 1), '2015-03-12T15:00:00Z');
cloud = cloudiness{matchrow, 2};

现在我需要每60分钟进行一次迭代,这样每次我都可以将这些数据存储在一个单独的文件中。有人能帮我使用定时器功能或其他功能吗?

您还没有尝试过该功能吗?如果是这样,什么不起作用?我知道定时器功能可能会起作用。但是我对matlab真的很陌生,我仍然在试图弄清楚如何使用定时器函数运行代码。最重要的是,我想构建一个代码,每次定时器函数运行时,它都会将所述代码的输出保存在不同的文件名中。