[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: simple question
From: |
Rick |
Subject: |
Re: simple question |
Date: |
Sat, 12 Dec 98 10:53:34 -0500 |
> 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. :)
Rick Niles.