[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: column elimination
From: |
Vic Norton |
Subject: |
Re: column elimination |
Date: |
Mon, 19 Jul 2010 21:12:23 -0400 |
How about this:
X = rand(5, 8)
I = [1:8](rand(1, 8) > 0.5) # eliminate these columns of X
X(:, I) = []
Regards,
Vic
On Jul 19, 2010, at 6:48 PM, Victor Carreto Pavon wrote:
> yes... that is right; I want all the columns except 1 and 4 in this case, but
> maybe in the next case I might not want all the columns except 3 and 5. then
> the notation A(:,[2,3,5:cols]) will no longer be useful.
>
> Do you know can I make it generic so it will work for any combination?
>
> and thanks for answering.
>
- Re: name variable, (continued)
- Re: name variable, bpabbott, 2010/07/16
- column elimination, insipido, 2010/07/19
- Re: column elimination, James Sherman Jr., 2010/07/19
- Re: column elimination, Victor Carreto Pavon, 2010/07/19
- Re: column elimination, James Sherman Jr., 2010/07/19
- Re: column elimination, Victor Carreto Pavon, 2010/07/19
- Re: column elimination, Ben Abbott, 2010/07/19
- Re: column elimination, Judd Storrs, 2010/07/19
- Re: column elimination, Victor Carreto Pavon, 2010/07/19
- Re: column elimination, Judd Storrs, 2010/07/19
- Re: column elimination,
Vic Norton <=