Code covered by the BSD License  

Highlights from
dlim

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 1.48 KB File ID: #45121

dlim

by

 

set date limits like they're x limits.

| Watch this File

File Information
Description

DLIM sets xlim using date numbers or date strings as input.

SYNTAX:
dlim([dmin dmax]) sets the x limits for datenumbers dmin and dmax.
dlim(dmin,dmax) sets the x limits for datenumbers or datestrings dmin and dmax.

EXAMPLES:
d = datenum('jan 1, 1990'):1:datenum('dec 31,2009');
y = 2*sin(t2/90)+rand(size(d));
figure
plot(d,y)
dlim('may 5, 1997','june 20, 2004') % <-- The dlim function
datetick('x','mmm-yy','keeplimits')

In the example above, the dlim command could similarly be given by dlim([729515 732118]) or dlim(729515,732118).

Acknowledgements

This file inspired Cbdate.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us