Re: assigning parameters from a matrix
- To: mathgroup at smc.vnet.net
- Subject: [mg27107] Re: assigning parameters from a matrix
- From: "Paul Lutus" <nospam at nosite.com>
- Date: Sun, 4 Feb 2001 02:58:34 -0500 (EST)
- References: <95glkt$8fg@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"F cartwright" <flc at ualberta.ca> wrote in message news:95glkt$8fg at smc.vnet.net... > Hi. I was hoping someone could help me. > > I have a function with 3 parameters, and I want to use a matrix to look at > the shape of this function in response to specific combinations of the > parameters (e.g., a = 1, b = 2, c = 3). I have created a matrix with my > different sets of parameters and have used the ReadList command to enter > into Mathematica. What command(s) do I use to apply the function to the > matrix and look at the different outcomes? I am having repeated lack of > success with Map. Is this what you are after? In[122]:= f[x_] := x[[1]]+x[[2]]+x[[3]] In[123]:=data = Table[x*y,{x,5},{y,3}] Out[123]={{1,2,3},{2,4,6},{3,6,9},{4,8,12},{5,10,15}} In[124]:=Map[f[#]&,data] Out[124]={6,12,18,24,30} If these are not the specifics of your problem or your data, why not post a specific example? -- Paul Lutus www.arachnoid.com