help-octave
[Top][All Lists]
Advanced

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

Re: matrix row


From: Geordie McBain
Subject: Re: matrix row
Date: Mon, 19 Sep 2005 16:49:13 +1000

On Mon, 2005-09-19 at 12:08 +0530, Mukesh wrote:
> hello,
> i was just wondering if one can point to a complete row of a matrix.
> 
> for example, i hav a matrix 'a=[ 1, 1, 2; 3, 5, 8; 13, 21, 34 ]' and i 
> want to print first row of the matrix '[ 1, 1, 2 ]'..
> but writing a(1) on the octave prompt doesnt give me that..
> 
> octave:46> a = [ 1, 1, 2; 3, 5, 8; 13, 21, 34 ]
> a =
>  
>    1   1   2
>    3   5   8
>   13  21  34
> 
> octave:47> a(1)
> ans = 1

Try a(1,:).



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

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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