Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
dpb
Posts:
6,677
Registered:
6/7/07
|
|
Re: Problem with Undefined variable
Posted:
Jan 23, 2013 10:57 AM
|
|
On 1/23/2013 8:41 AM, Camilo Diaz wrote: > Thank you for your answer but I haven't changed anything from the > script. In fact, you can see the original file here: > http://www.mathworks.com/matlabcentral/fileexchange/28684-...
Well, there had to have been a yr variable in the base workspace then for it to have ever succeeded like that.
You'll have to make the script fit your situation...
> > I think the script was made in a different version of matlab, because I > put the variable > yr=2004; > and comment the for cicle (to test just with year 2004), and I get > errors like: > Error using datenum (line 181) > DATENUM failed... Error using dtstr2dtnummx > Failed on converting date string to date number.. > > What can I do to fix these? I really need the MAT file that is generated > from this script.
Perhaps but afaik DATENUM hasn't changed in behavior.
Use the DEBUGger and set break on error and look at the date string being passed to DATENUM at that point and see where the problem lies...
doc DATENUM
will give you the allowable formats...
--
|
|
|
Date
|
Subject
|
Author
|
|
1/23/13
|
|
dpb
|
|
1/23/13
|
|
dpb
|
|
|