Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'map with several arguments' topicStudent Support Forum > General > Archives > "map with several arguments"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
yehuda
10/12/12 5:05pm

Prepare you functions and data
myfunction[x_, y_, z_] := x^2 + y + z^2;
xzList = {{1, 5}, {2, 6}, {3, 7}};

Functional Programming Style:

Map[myfunction[#[[1]], y, #[[2]]] &, xzList]

Pattern Matching Style:
xzList /. {x_, z_} :> myfunction[x, y, z]


IHTH
yehuda

URL: ,

Subject (listing for 'map with several arguments')
Author Date Posted
map with several arguments Felipe B 10/11/12 3:18pm
Re: map with several arguments Bill Simpson 10/12/12 2:00pm
Re: map with several arguments yehuda 10/12/12 5:05pm
Re: map with several arguments JamesF 10/12/12 9:33pm
Re: map with several arguments yehuda 10/14/12 02:34am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic