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

Close-button

Sunrise times in Boston, MA

This trend is broken.

Error using urlreadwrite (line 99)
Error downloading URL. Your network connection may be down or your proxy settings improperly configured.

Error in urlread (line 36)
[s,status] = urlreadwrite(mfilename,catchErrors,url,varargin{:});

  • Created by: Muthu Annamalai
  • Last ran: about 1 month ago.
  • Auto-run in: about 1 month.
  • Created on: 20 Sep 2012

763

data points

Error

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 763) Show All Data

Time Recorded (time1818) Data (data1818)
01 Nov 2014 05:00:28 NaN
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]
% 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