Click the box titles below to expand:
How to's
XSLT
GOOGLE MAPS API
PHP
- PHP & Web Services — using SOAP to get meteorological data for a location
- PHP and Flickr accessing online photos through the phpFlickr class
Antelope
- Github, Git & contrib
- Antelope & Using amakelocal
- Antelope & Matlab time conversion
- Create an Antelope Mail Archive
- Adding new projects to the Antelope contrib area using CVS
Perl
Document Object Model (DOM)
UNIX
- Convert GE KML files for use with GMT
- Various snippets that make my life easier
- Using Subversion to version control web sites
Generic Mapping Tools (GMT)
Miscellaneous
Projects
Courses Taught
Latest Favorites
- Best of Vim tips
- Make your pages load faster by combining and compressing javascript and css files
- Creating Liquid Faux Columns
- Setting up SSL under Apache 2 on SuSE
- PHP editing with ViM
- Getting equal-height columns in a three-column layout
- Star html Selector Bug
- Reset MySQL root account permissions
- How to write UNIX man pages
- Son of Suckerfish Dropdowns
- Aidan's PHP Repository
- Adium IM client
- ShapeShifter
- Install wiki on an iBook
- Quirksmode
- PHP
- GD
- JpGraph
- Vim Text Editor
- Generic Mapping Tools (GMT)
Mac OS X
Web Development
Beta
How To :: Antelope – Matlab tricks and tips
Converting between timestamps used by Antelope and Matlab
Antelope gives out epoch times as integer representations from Jan 01, 1970. Matlab does not like those, and prefers serial numbers (time in days since Jan 01 0000). Don't ask my why....
- First retrieve the epoch time that you are interested in:
- Convert this to a string that Matlab can understand (aka a Date String):
- Convert this to a Matlab happy value (aka serial time) using datenum, which likes only three very specific formats:
- Add this to a matrix, where 'i' is the incrementing value increasing by one in every loop (ie. appending to the matrix):
- When it comes time to plot these values (graph_x is matrix with time stamps, graph_y is matrix with values):
- The Matlab function datetick takes the serial timestamps, and converts them on the plot using a conversion integer.
I used '26' which equates to:
You can use any int value listed in the 'Date Format Number' table. Follow the link below.Int Format Example 26 'yyyy/mm/dd' 2000/03/01
datetick( 'x',26,'keeplimits' ) ;
More information: http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/datetick.html
this_time= dbgetv( dbpointer, 'time' ) ;
this_mextime = epoch2str( this_time, '%d-%b-%Y %H:%M:%s' ) ;
this_serialtime = datenum( this_mextime, 0 ) ;
More information: http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/datenum.html
graph_x(i) = this_serialtime ;
plot( graph_x, graph_y, 'Color','r', 'LineWidth', 2 ) ;
This results in an x-axis scale like this, with real epoch times converted: