help-octave
[Top][All Lists]
Advanced

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

Re: invoking octave from command line with ubuntu


From: Steve Thompson
Subject: Re: invoking octave from command line with ubuntu
Date: Wed, 28 Nov 2007 09:07:38 -0800

On Nov 28, 2007 2:28 AM, nikkos <address@hidden> wrote:
> if i open a terminal and write octave (so the prompt now is
> from octave) i can run my program e.g. klo1.m
>
> I put in the first line of my program:    #!/usr/bin/octave and
> i made the file executable.
>
> But still, when i write:      /home/student/m/klo1.m i don't
> take anything, neither error nor my output.
>
> Do you have any idea?

nikkos,

It isn't totally clear what your problem is, but I'll take a
guess.  You just want to run the commands in klo1.m in Octave.
To be simple, let's just say that klo1.m reads as follows:

  % This is klo1.m
  clear
  a = 1

Open your terminal.  Type

  cd /home/student/m/

To verify the content of klo1.m, type

  cat klo1.m

The output is:

  % This is klo1.m
  clear
  a = 1

Start Octave in the terminal:

  octave

Then run klo1.m:

  octave:1> klo1
  a =  1

Steve


reply via email to

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