[Top][All Lists]

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

Re: C++ template

From: Mike Miller
Subject: Re: C++ template
Date: Mon, 4 Oct 2004 16:38:56 -0500 (CDT)

On Mon, 4 Oct 2004, Fredrik Bulow wrote:

That's weird. If I run the same sequence as you just did I get:

octave:1> a=ones(5,5)
a =

 1  1  1  1  1
 1  1  1  1  1
 1  1  1  1  1
 1  1  1  1  1
 1  1  1  1  1

octave:2> a(6)==a(1,2)
error: single index only valid for row or column vector
error: evaluating binary operator `==' near line 2, column 5

I think this is a problem with do_fortran_indexing, which has been eliminated as a global variable in recent versions of Octave. Try doing this:

octave:1> do_fortran_indexing

And see if it returns a zero.  If it does, try this:

octave:2> do_fortran_indexing = 1;

Then rerun your a(6)==a(1,2) code and see what happens.

It is possible that the people using Octave version 2.1.50 who do not see this problem have their do_fortran_indexing global variable set to 1 by default. I also think that the newer versions of Octave that do not have do_fortran_indexing, have the functionality that one used to get with do_fortran_indexing set to 1. This is MATLAB compatible.


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]