[Top][All Lists]

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

issue with user preferences (was "problem with column specification in m

From: John W. Eaton
Subject: issue with user preferences (was "problem with column specification in matrices")
Date: Thu, 31 Oct 2002 19:44:34 -0600

On 31-Oct-2002, Mike Miller <address@hidden> wrote:

| On Thu, 31 Oct 2002, John W. Eaton wrote:
| > Yes, look for whitespace_in_literal_matrix in the manual.
| >
| > If you start Octave with --traditional, it this variable is set to
| > "traditional" so you get the Matlab-like behavior.
| >
| > But the very existence of this variable is a problem, because unless you
| > are very careful, then the way your code works (or not) can depend on
| > the setting of a user preference.
| This is an interesting general issue.  Is there any way to ensure that a
| function or script will not fail due to user preferences?

It depends on the particular variable.  For
whitespace_in_literal_matrix, you simply need to separate all elements
with commas or semicolons and never have any whitespace that might be
significant.  For example,

  [ linspace (1, 2) ]

is bad, but

  [ linspace(1, 2)) ]


  [ (linspace (1, 2)) ]

is OK.

Some of the preference variables don't cause any real problems.  For
example, the ones that affect how output is displayed, or what is
printed for the prompt.  The troublemakers are things like
whitespace_in_literal_matrix, do_fortran_indexing,
implicit_str_to_num_ok, implicit_num_to_str_ok, prefer_column_vectors,
etc.  My general plan at this point is to eliminate as many of these
as possible, and to not introduce any more.

| Is there a way to start octave with all user preferences turned off (set
| to defaults)?

But which defaults do you want?  The ones that make Octave most like
Matlab, or the ones that are most sensible?


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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