help-octave
[Top][All Lists]
Advanced

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

Re: Getting started with Octave in MS Windows


From: Michael Grossbach
Subject: Re: Getting started with Octave in MS Windows
Date: Sat, 10 Feb 2007 14:23:07 +0100
User-agent: Thunderbird 2.0b2 (Windows/20070116)

The Grumps wrote:
I have the same problem.  Did you make any progress Allen?  I installed with
octave-forge-windows (version 2.1.73-1).
This is a very alien environment for those from planet Windows. I can't: - use standard things like copy and paste.
    - directly go to edit-history for the script I'm working on.  Should I
not be using Notepad instead?
Ian

I use 2.1.73-1 on w2k and I am very happy too with SciTE for the same reasons Robert pointed out. If you type
>edit functionname
at the Octave prompt SciTE opens the script and you can work on it. This only works though when you have the appropriate commands added to your .octaverc file. I attached a version of my .octaverc file which you can modify with notepad.exe (or SciTE or any other text editor) to your needs. Here are a few comments: I collected most of the information needed to compile the file from this very list, so if it doesn't have yet what you need, search this list. Have a look at the comments to probably better understand what it's doing and to no longer feel alien to planet cygwin.

# Your email address gets added to
# newly created function script
# headers in the copyright section:
edit('email', 'address@hidden');

# Your Windows user name gets added
# to newly created function script
# headers in the copyright section:
edit('author', getenv('USERNAME'));

# I don't want to have my working
# files somewhere deep in the Programs
# folder. I therefore first check
# whether C:\files exist and if it does put it
# in the variable pluspath (note the
# cygwin drive letter thingy someone else
# explained earlier in this thread):
if exist('/cygdrive/c/files', 'dir')    
        pluspath = '/cygdrive/c/files/';
else
        warning('Can't find HOME, falling back to default')
        pluspath = '/octave_files//';
endif

# Now add the working files path to
# Octave's own search path
# (note there are two versions
# around to do this, if you use Octave
# 2.1.x then you need to do it the
# LOADPATH way; also note the leading
# colon and the trailing slash concatenated
# with the path in pluspath):
LOADPATH = [LOADPATH, ':' pluspath '/']; # version 2.1.x
#addpath([':' pluspath '/']) # This only works in version 2.9.x

# Change Directory to the path in
# pluspath. You want to work where
# your files are:
cd(pluspath);

# To be able to change directory
# back to $HOME by just typing
# cd ~, someone on this list
# suggested to put the following line
# into the .octaverc file:
edit('home', pluspath);
# Unfortunately, it doesn't work
# nor can I find the Octave variable
# 'home' in the manual. Did I
# misunderstand something there?
# Make a typo? Any suggestions appreciated.

# To make editing your scripts
# easy and have Octave open them with
# SciTE when you type
# >edit functionname
# at the prompt, you need this rather
# complicated line. Note: if it
# doesn't work as expected you
# need to check where your SciTE
# resides and change the path accordingly:
edit('editor', '"/cygdrive/c/Program Files/GNU Octave 2.1.73/wscite/scite.exe" "`cygpath -wa %s`"');

# Make Octave beep on errors:
beep_on_error = 1;

# Go into debug mode when an error occurs:
debug_on_error = 1;

# Enable leaving debug mode by
# pressing Ctrl-C:
debug_on_interrupt = 0;

# Stop Octave printing the line
# number at the prompt:
PS1 = "\\s> ";


On w2k copying and pasting with <Ctrl>-C and <Ctrl>-V doesn't work. You can use <Ctrl>-<INSERT> (for copying) and <Shift>-<INSERT> (for pasting) instead.

HTH, Michael
# Your email address gets added to newly created function script 
# headers in the copyright section:
edit('email', 'address@hidden');

# Your Windows user name gets added to newly created function script 
# headers in the copyright section:
edit('author', getenv('USERNAME'));

# I don't want to have my working files somewhere deep in the Programs
# folder. I therefore first check whether C:\files exist and if it does put it 
# in the variable pluspath (note the cygwin drive letter thingy someone else 
# explained earlier in this thread):
if exist('/cygdrive/c/files', 'dir')    
        pluspath = '/cygdrive/c/files/';
else
        warning('Can't find HOME, falling back to default')
        pluspath = '/octave_files//';
endif

# Now add the working files path to Octave's own search path
# (note there are two versions around to do this, if you use Octave
# 2.1.x then you need to do it the LOADPATH way; also note
# the leading colon and the trailing slash concatenated with 
the path in pluspath):
#addpath([':' pluspath '/']) # This only works in version 2.9.x
LOADPATH = [LOADPATH, ':' pluspath '/']; # version 2.1.x

# Change Directory to the path in pluspath. You want to work where 
# your files are:
cd(pluspath);

# To be able to change directory back to $HOME by just typing 
# cd ~, someone on this list suggested to put the following line 
# into the .octaverc file:
edit('home', pluspath);
# Unfortunately, it doesn't work nor can I find the Octave variable 
# 'home' in the manual. Did I misunderstood something there? 
# Make a typo? Any suggestions appreciated. 

# To make editing your scripts easy and have Octave open them with 
# SciTE when you type 
# >edit functionname
# at the prompt, you need this rather complicated line. Note: if it
# doesn't work as expected you need to check where your SciTE
# resides and change the path accordingly:
edit('editor', '"/cygdrive/c/Program Files/GNU Octave 2.1.73/wscite/scite.exe" 
"`cygpath -wa %s`"');

# Make Octave beep on errors:
beep_on_error = 1;

# Go into debug mode when an error occurs:
debug_on_error = 1;

# Enable leaving debug mode by pressing Ctrl-C
debug_on_interrupt = 0;

# Stop Octave printing the line number at the prompt:
PS1 = "\\s> ";

reply via email to

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