필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Can tic toc function be used to simulate other function after every 60 min?

조회 수: 2 (최근 30일)
Punit Gandhi
Punit Gandhi 2015년 3월 17일
마감: MATLAB Answer Bot 2021년 8월 20일
In my code I need to simulate my matlab code after every 60 minutes for 2 days. I have to retrieve a particular data from a url. Currently I have figured out how to do that.
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-20T15:00:00Z'); cloud = cloudiness{matchrow, 2};
Now I need to do this iteration every 60 min, so that I can store this data in a separate file each time. Can someone help me with how to do it with the help of tic toc function or with some other function?

답변 (1개)

Star Strider
Star Strider 2015년 3월 17일
Use a timer.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by