File Exchange

image thumbnail

ParseLatLongStrings

version 1.0.0.0 (1.86 KB) by David Rayner
Convert from DD:MM:SS strings to decimal numeric

0 Downloads

Updated 18 Sep 2017

View License

ParseLatLongStrings - convert from DD:MM:SS strings to decimal numeric
%
% Convert strings representing angles in colon-seperated
% Degree-Minutes-Seconds format to decimal degrees.
%
% Call as:
% [dec_out] = ParseLatLongStrings(flexible_in);
%
% All the following return -20.5:
%
% ParseLatLongStrings('-20:30:00.00')
% ParseLatLongStrings('20:30:00 S')
% ParseLatLongStrings('20:30:00 E')
% ParseLatLongStrings('-20:30:00 e') % not sure if this is ever used...
% ParseLatLongStrings('20:30 s')
% ParseLatLongStrings(-20.5) % ie will return numeric if passed numeric
%
% Cell-array inputs of all the above types are supported, as are
% multi-line character arrays of format:
% ParseLatLongStrings(['20:30 s' ; '30:30 n'])

Cite As

David Rayner (2020). ParseLatLongStrings (https://www.mathworks.com/matlabcentral/fileexchange/64447-parselatlongstrings), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

Updates

1.0.0.0

title change

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux