[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Constructing arrays
From: |
John W. Eaton |
Subject: |
Re: Constructing arrays |
Date: |
Tue, 27 Jul 2010 11:36:55 -0400 |
On 26-Jul-2010, Andy Buckle wrote:
| >a=floor(rand(1,16)*3)
| a =
|
| 1 0 1 0 1 0 1 2 0 2 1 0 0 0 0 2
|
| >a(find(a==0))=[]
| a =
|
| 1 1 1 1 2 2 1 2
The call to find is not necessary here. You can use
a(a == 0) = []
to do the same thing.
jwe
- Constructing arrays, dirac, 2010/07/26
- Re: Constructing arrays, Martin Helm, 2010/07/26
- Re: Constructing arrays, dirac, 2010/07/26
- Re: Constructing arrays, Martin Helm, 2010/07/26
- RE: Constructing arrays, dirac, 2010/07/26
- Re: Constructing arrays, Andy Buckle, 2010/07/26
- Re: Constructing arrays, dirac, 2010/07/26
- Re: Constructing arrays, Andy Buckle, 2010/07/26
- Re: Constructing arrays, Martin Helm, 2010/07/26
- Re: Constructing arrays, dirac, 2010/07/27
- Re: Constructing arrays,
John W. Eaton <=
- Re: Constructing arrays, dirac, 2010/07/28
- Re: Constructing arrays, Jaroslav Hajek, 2010/07/28