octave-maintainers
[Top][All Lists]
Advanced

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

Re: octave "Most Wanted" feature


From: robert bristow-johnson
Subject: Re: octave "Most Wanted" feature
Date: Wed, 29 Nov 2006 11:43:41 -0500

> ----- Original Message -----
> From: "David Bateman" <address@hidden>
> Subject: Re: octave "Most Wanted" feature
> Date: Wed, 29 Nov 2006 17:26:12 +0100
> 
> Have you checked?
> 
> >> version
> 
> ans =
> 
> 7.3.0.298 (R2006b)
> 
> >> A = [1 2 3;4 5 6]
> 
> A =
> 
>       1     2     3
>       4     5     6
> 
> >> A(4)
> 
> ans =
> 
>       5

you guys must be correct (and my memory is not).  i don't have MATLAB on this 
linux machine here at work, but i found this web page:

http://en.wikibooks.org/wiki/MATLAB_Programming/Introduction_to_array_operation

that says:
  ...
  You can also access a matrix element through a unique
  index; in this case, the order is column major, meaning
  you first go through all elements of the first column,
  then the 2d column, etc... The column major mode is the
  same than in Fortran, and the contrary of the order in
  the C language.
  
  >> a = [1, 2, 3; 4, 5, 6];
  >> a(3)
  
  ans =
  
      2


my mistake.  i will rewire that neuron.

but i still do not think it affects the issue at hand.

--

r b-j                  address@hidden

"Imagination is more important than knowledge."




reply via email to

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