Re: Easy Mapping problem that has me stumped!
- To: mathgroup at smc.vnet.net
- Subject: [mg82804] Re: [mg82743] Easy Mapping problem that has me stumped!
- From: DrMajorBob <drmajorbob at bigfoot.com>
- Date: Wed, 31 Oct 2007 06:15:47 -0500 (EST)
- References: <4504143.1193742865936.JavaMail.root@m35>
- Reply-to: drmajorbob at bigfoot.com
> That works great. But I want to keep x,y & z <=1. I'm not sure what you mean by "keep" in this case, but maybe it's this: m = {{{0, 1, 1}, {1, 0, 1}, {1, 1, 0}}, {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}} Manipulate[ Clip@Map[# + ({x, y, z}) &, m, {2}], {x, 0, 1}, {y, 0, 1}, {z, 0, 1}] Bobby On Tue, 30 Oct 2007 03:30:19 -0500, RicoS <rob.ladd at gmail.com> wrote: > I'm trying to iterate through a list and add x to different elements, > got that. But I want to keep the values <= 1. > I have something like this: > > m = {{{0, 1, 1}, {1, 0, 1}, {1, 1, 0}}, {{1, 0, 0}, {0,1,0}, {0,0,1}}} > > Manipulate[Map[# + ({x, y, z}) &, m, {2}], {x, 0, 1}, {y, 0, 1}, {z, 0, > 1}] > > That works great. But I want to keep x,y & z <=1. (It'a a threshold > thing) > > How should I apply Min? I've tried everything I can think of, but I'm a > total noob. > Thanks for your help!! > > -- DrMajorBob at bigfoot.com