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: Problem with Undefined variable
Replies: 3   Last Post: Jan 23, 2013 10:57 AM

Advanced Search

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

Posts: 8,113
Registered: 6/7/07
Re: Problem with Undefined variable
Posted: Jan 23, 2013 10:57 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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...

--



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.