Since you are new, let us show you how Trendy works.

Close-button

Sunrise times in Boston, MA

  • Created by: Muthu Annamalai
  • Last ran: about 17 hours ago.
  • Auto-run in: about 7 hours.
  • Created on: 20 Sep 2012

762

data points

Description:

Included from trend description:

Sunrise times in Boston, MA based on data from US Naval Observatory, but using the ''urlread'' instead of ''urlfilter'' since it doesn't support POST/GET methods.

Note: It would be a good enhancement for URLFILTER.

Ref: http://aa.usno.navy.mil/data/docs/RS_OneDay.php

Recently Collected Data (last 5 of 762) Show All Data

Time Recorded (time1818) Data (data1818)
31 Oct 2014 05:00:28 [7.26666666666667]
30 Oct 2014 05:00:30 [7.25]
29 Oct 2014 05:00:30 [7.23333333333333]
28 Oct 2014 05:00:26 [7.21666666666667]
27 Oct 2014 05:00:27 [7.18333333333333]
% Example code added - Retrieve answer count on MATLAB Answers

url = 'http://aa.usno.navy.mil/cgi-bin/aa_pap.pl';

state = 'MA';
place = 'BOSTON';
d=regexp(date(),'-','split');
    months = {'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'};
    for itr = 1:12
        if ( strcmpi(months{itr},d{2}) )
            d{2} = num2str(itr);
            break;
        end
    end
    str = urlread(url,'POST',{'xxm',d{2},'xxd',d{1},'xxy',d{3},'st',state,'placeus',place});

p=regexp(str,'Sunrise','split');
q=regexp(p{2},'\n','split');
s=regexp(strtrim(q{1}),'[:\ ]','split'); %has sunrise data in hrs as string
hr = str2double(s{1});
min = str2double(s{2});
count = hr + min/60;

updatetrend(count);
Tags:

    Add Tags


    0 comments