Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Question on datenum
Replies: 1   Last Post: Nov 4, 2009 10:14 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Yvonne

Posts: 6
Registered: 5/3/09
Question on datenum
Posted: Nov 4, 2009 9:45 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

I am trying to create an hourly timeseries for a tidal record but am having some trouble with datenum functions. The example of the code i used is written below:

time=datenum(2006,8,31,10,15,0);
time=(time-datenum(2006,8,1,0,0,0));
t = 0:1:max(time);
eta3 = amp*cos(((((2*pi)/24))*t)+pha);

figure;
plot(t,eta3,'.-')
datetick('x',0)

Using, the datenum function, i wanted to create an hourly time period but instead i have created a daily time period. Any suggestions to correct the mistake abouve is greatly appreaciated.


Date Subject Author
11/4/09
Read Question on datenum
Yvonne
11/4/09
Read Re: Question on datenum
dpb

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2009. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Goodwin College of Professional Studies.