MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Easy Mapping problem that has me stumped!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82852] Re: [mg82780] Re: [mg82743] Easy Mapping problem that has me stumped!
  • From: Syd Geraghty <sydgeraghty at mac.com>
  • Date: Thu, 1 Nov 2007 05:17:13 -0500 (EST)
  • References: <200710300830.DAA13635@smc.vnet.net> <200710311103.GAA21204@smc.vnet.net>

It looks like there is no need to specify levelspec for Map or wrap  
{x,y,z} in parentheses ({x,y,z}).

This is the least code that I could find that is equivalent

Manipulate[ Clip[Map[# + {x, y, z} &, m], {0, 1}], {x, 0, 1}, {y, 0,  
1}, {z, 0, 1}]

Cheers ... Syd

Syd Geraghty B.Sc., M.Sc.
sydgeraghty at mac.com
San Jose, CA

My System

Mathematic 6.0.1 for Mac OS X x86 (32 - bit) (June 19, 2007)  License  
L2983-5890
MacOS X V 10.4 .10
MacBook Pro 2.33 Ghz Intel Core 2 Duo  2GB RAM

On Oct 31, 2007, at 4:03 AM, Carl Woll wrote:

> RicoS 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!!
>>
>>
> Try using Clip:
>
> Manipulate[
>  Clip[Map[# + ({x, y, z}) &, m, {2}], {0, 1}], {x, 0, 1}, {y, 0,
>   1}, {z, 0, 1}]
>
> Carl Woll
> Wolfram Research
>



  • Prev by Date: Re: What is the precedence wrt Mathematica infix operators
  • Next by Date: Re: How to construct a vector whose elements are also vectors?
  • Previous by thread: Re: Easy Mapping problem that has me stumped!
  • Next by thread: Help on drawing intervals