[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hello World function
From: |
Andy Buckle |
Subject: |
Re: Hello World function |
Date: |
Tue, 21 Dec 2010 11:49:38 +0000 |
> Hi,
>
> I'm trying to get started with functions. I have created Hello.m and
> added its directory with addpath. Hello.m looks like this:
>
> ------------------------------------
> function Hello
> printf("\nHej\n\n");
> end
> -----------------------------------
>
> I call the function by typing "Hello".
>
> I get:
>
> "error: "Hello" undefined near line..."
>
> What is wrong?
That works for me. What is your
OS,
version of Octave,
where did you get Octave from?
Another thought. Is Hello.m in your current directory, or your path?
- pwd gives working directory
- ls lists stuff in path
- path to see directories in your path
- addpath
--
/* andy buckle */