Re: Matrices and Conditional Statements
- To: mathgroup at smc.vnet.net
- Subject: [mg61456] Re: Matrices and Conditional Statements
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Wed, 19 Oct 2005 02:17:10 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 10/18/05 at 2:44 AM, gregory.lypny at videotron.ca (Gregory Lypny) wrote: >If I have an n x m array called X, how can I create another >array, Y, whose rows are those rows in X whose 8th column contains >the word "red" and whose 11th column is a number greater than 9? Y = Select[X, StringMatchQ[#[[8]], "red"] && #[[11]]>9&] Here, I am assuming the word "red" in the array is a string. If instead it is a symbol then Y = Select[X, #[[8]] == red && #[[11]]>9&] -- To reply via email subtract one hundred and four