help-octave
[Top][All Lists]
Advanced

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

Re: Working on M-files


From: Michael Goffioul
Subject: Re: Working on M-files
Date: Mon, 22 Sep 2008 09:54:09 +0200

On Sun, Sep 21, 2008 at 11:41 PM, Jackie Y. <address@hidden> wrote:
> To Whom It May Concern:
>
> I am a college student who have installed Octave for my computer as an
> alternative to Matlab. I am very pleased that much, if not all of the syntax
> is exactly the same as Matlab. However, after reading on many sites, I do
> not understand how one will create and execute a m-file on octave. By typing
> in "edit" in the command line, Scite opens up. I can create a code in it,
> but I cannot save it.

What do you mean "you cannot save it"? What error message do you get?
Are you saving to a directory where you have write access?

> Furthermore, I cannot seem to copy and paste it into
> Octave's command line.

Copy and paste into octave command windows (which is actually
a Windows command prompt) is not intuitive. You have to click on the
icon on the left-side of the title bar and follow the "Edit" menu entry.

> I would like to know how to be able to create M-files
> in Octave, and how to run it in Octave. Because I am not very
> computer-savvy, I would appreciate if you would explain it to me in the
> simplest way. I appreciate your time and answers and thankyou for making
> such a magnificient program.

The simplest way is the following:
1) edit and save m-files with whatever text editor you like (octave comes
with SciTE, but you can use any other editor); save you files into any
directory you like, let's call it C:\My\Dir
2) in octave, add the save directory to the octave search path:

  addpath C:\My\Dir

3) run your m-files from octave prompt

One variant of this is to use the octave current working directory to
save your files (type "pwd" at octave prompt). As the current working
directory is automatically part of the octave search path, the files will
be always visible to octave. If you want to know more about octave
search path, see "help path" and "help addpath".

Michael.


reply via email to

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