help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Need Help Loading Functions


From: Allen.Windhorn
Subject: RE: Need Help Loading Functions
Date: Thu, 30 Aug 2012 14:42:00 +0000

From: address@hidden 

>> I made a text file with

>> "function [y1,y2]= squareAndCubeThisNumber(x)

>> y1= x^2;
>> y2=x^3;"

>> And that's it in a txt file saved as "squareAnd CubeThisNumber.m"

>> I saved it to a folder, which is the directory recognized by Octave 
>> when I type pwd.

>> C:\Users\etc.

>> when I try to call upon the function, Octave says it's undefined,
>> yet the file in in the appropriate folder.


> That should be how it works.  Though I just want to make sure that
> there is no space in your filename (my guess is that it is you just
> made a typo when writing the email).  Also, just to try and cover
> all the bases, double (and triple) check that there is no typos in
> your spelling of the file or function name.  I've done this on too
> many occasions to count.

Also, oddly, in Windows it seems to be necessary to capitalize the
function and file names identically, even though the operating system
doesn't care.  Try calling it "foo" instead.

Regards,
Allen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]