From help-octave-request at bevo dot che dot wisc dot edu Sat Dec 12 14:19:59 1998 Subject: Re: simple question From: Vitaliy A Repin To: help-octave at bevo dot che dot wisc dot edu Date: Sat, 12 Dec 1998 23:18:40 +0300 On Sat, Dec 12, 1998 at 10:53:34AM -0500, Frederick A Niles wrote: > > > One simple question. > > There is a matrix A: > > > > How can I use the first/second column or row of this matrix? > > Is there any Octave operator which gives me the n-th column(row) > > of matrix as vector? > > > octave:1> A= [[1 2] > > [3 4] > > [5 6] > > [7 8] > > [9 10] > > [0 2] > > [3 4]] > A = > > 1 2 > 3 4 > 5 6 > 7 8 > 9 10 > 0 2 > 3 4 > > octave:2> A(:,2) > ans = > > 2 > 4 > 6 > 8 > 10 > 2 > 4 > > octave:3> A(2,:) > ans = > > 3 4 > > octave:4> > > ----------------- > Transpose with "'" (single quote) and you should probably RTFM. :) Thank you very much for your answer. > > Rick Niles.