|
From: | Samuel H. Dupree, Jr. |
Subject: | Matlab date and time functions |
Date: | Tue, 04 Apr 2006 02:06:23 -0400 |
User-agent: | Thunderbird 1.5 (Macintosh/20051201) |
I'm running Octave 2.1.71 on a Mac G5 under mac OS 10.4.5. I am
attempting to run a program written in Matlab using Octave. The Matlab
program running under Matlab works fine. My problem occurs when I'm
running the program under Octave. The program abnormally terminates
when it attempts to execute the function "datenum." The listing for the
function where the error occurs follows: function [cdstr, utstr] = jd2str(jdate) % convert Julian date to string equivalent % calendar date and universal time % input % jdate = Julian date % output % cdstr = calendar date string % utstr = universal time string % Orbital Mechanics with MATLAB %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [month, day, year] = gdate(jdate); % serial date number sdn = datenum(year, month, day); % create calendar date string cdstr = datestr(sdn, 1); % create universal time string utstr = datestr(day - fix(day), 13); The diagnostic message issued by Octave is: error: `datenum' undefined near line 23 column 7 error: evaluating assignment _expression_ near line 23, column 5 error: called from `jd2str' in file `/AstrodynamicsLib/ipto_de Folder/jd2str.m' error: near line 343 of file `/AstrodynamicsLib/ipto_de Folder/ipto_de.m' >From what I can tell, the arguments being passed to datenum seem okay, yet Octave reports that datenum is undefined. Any thoughts? Thanks in advance. Sam Dupree. |
[Prev in Thread] | Current Thread | [Next in Thread] |