Iterate MapThread with matricesEquating matrices (or higher order tensors) element-wiseCan I return lists with different dimensions from a compiled function?MapThread multiple functions onto multiple listsFinding elements from a sparse matrixModifying a list of matrices with conditional statementEasy way to perform multiplication of two 2x2 matrices, that contain list elements?Cannot use Part in Pure FunctionFaster position-based duplicate removal in a ragged array?Importing and saving .csv files as variables with the original filebasenamesWhat is the fastest way of combining elemts of lists in rules?
Word ending in "-ine" for rat-like
Avoiding repetition when using the "snprintf idiom" to write text
Could you fall off a planet if it was being accelerated by engines?
I agreed to cancel a long-planned vacation (with travel costs) due to project deadlines, but now the timeline has all changed again
Making a wall made from glass bricks
How to describe POV characters?
How can I deal with extreme temperatures in a hotel room?
What game is this character in the Pixels movie from?
How can I know if a PDF file was created via LaTeX or XeLaTeX?
Can purchasing tickets for high holidays services count as maaser?
What was the point of separating stdout and stderr?
How does mmorpg store data?
How could an armless race establish civilization?
Quantum jump/leap, exist or not, and instantaneous or not (for electrons)?
Origin of the convolution theorem
Is it okay to submit a paper from a master's thesis without informing the advisor?
"I am [the / an] owner of a bookstore"?
A finite 2 group containing the dihedral group of order 16?
When casting a spell with a long casting time, what happens if you don't spend your action on a turn to continue casting?
If two black hole event horizons overlap (touch) can they ever separate again?
Does a lens with a bigger max. aperture focus faster than a lens with a smaller max. aperture?
Does a return economy-class seat between London and San Francisco release 5.28 tonnes of CO2 equivalents?
Adjective for 'made of pus' or 'corrupted by pus' or something of something of pus
/etc/hosts not working
Iterate MapThread with matrices
Equating matrices (or higher order tensors) element-wiseCan I return lists with different dimensions from a compiled function?MapThread multiple functions onto multiple listsFinding elements from a sparse matrixModifying a list of matrices with conditional statementEasy way to perform multiplication of two 2x2 matrices, that contain list elements?Cannot use Part in Pure FunctionFaster position-based duplicate removal in a ragged array?Importing and saving .csv files as variables with the original filebasenamesWhat is the fastest way of combining elemts of lists in rules?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
Consider a function f
and a list p=a,b,c
. I want to get a list of
f[a,a]
f[a,b]
f[a,c]
f[b,a]
f[b,b]
f[b,c]
f[c,a]
f[c,b]
f[c,c]
In real use, p
can have higher dimensions, and f may take more arguments, e.g. I may need to generate a list of f[a,a,a,a]
through f[z,z,z,z]
. Is there a cleaner way to do this other than making lists that approximately repeat the elements of p
then use MapThread
? e.g.
p=a,b
p1 = a, a, b, b
p2 = a, b, a, b
MapThread[f, p1, p2]
Here, a
, b
can be matrices
list-manipulation map
$endgroup$
add a comment |
$begingroup$
Consider a function f
and a list p=a,b,c
. I want to get a list of
f[a,a]
f[a,b]
f[a,c]
f[b,a]
f[b,b]
f[b,c]
f[c,a]
f[c,b]
f[c,c]
In real use, p
can have higher dimensions, and f may take more arguments, e.g. I may need to generate a list of f[a,a,a,a]
through f[z,z,z,z]
. Is there a cleaner way to do this other than making lists that approximately repeat the elements of p
then use MapThread
? e.g.
p=a,b
p1 = a, a, b, b
p2 = a, b, a, b
MapThread[f, p1, p2]
Here, a
, b
can be matrices
list-manipulation map
$endgroup$
$begingroup$
What aboutOuter
?
$endgroup$
– chuy
Jun 20 at 19:31
$begingroup$
@chuy Thanks! butOuter
may not be a good fit whena,b ...
are matrices.
$endgroup$
– egwene sedai
Jun 20 at 19:35
$begingroup$
Just realized thatp = a, b, c; Distribute[f[p, p], List]
works
$endgroup$
– egwene sedai
Jun 20 at 19:44
add a comment |
$begingroup$
Consider a function f
and a list p=a,b,c
. I want to get a list of
f[a,a]
f[a,b]
f[a,c]
f[b,a]
f[b,b]
f[b,c]
f[c,a]
f[c,b]
f[c,c]
In real use, p
can have higher dimensions, and f may take more arguments, e.g. I may need to generate a list of f[a,a,a,a]
through f[z,z,z,z]
. Is there a cleaner way to do this other than making lists that approximately repeat the elements of p
then use MapThread
? e.g.
p=a,b
p1 = a, a, b, b
p2 = a, b, a, b
MapThread[f, p1, p2]
Here, a
, b
can be matrices
list-manipulation map
$endgroup$
Consider a function f
and a list p=a,b,c
. I want to get a list of
f[a,a]
f[a,b]
f[a,c]
f[b,a]
f[b,b]
f[b,c]
f[c,a]
f[c,b]
f[c,c]
In real use, p
can have higher dimensions, and f may take more arguments, e.g. I may need to generate a list of f[a,a,a,a]
through f[z,z,z,z]
. Is there a cleaner way to do this other than making lists that approximately repeat the elements of p
then use MapThread
? e.g.
p=a,b
p1 = a, a, b, b
p2 = a, b, a, b
MapThread[f, p1, p2]
Here, a
, b
can be matrices
list-manipulation map
list-manipulation map
edited Jun 20 at 19:30
egwene sedai
asked Jun 20 at 19:08
egwene sedaiegwene sedai
1,87310 silver badges21 bronze badges
1,87310 silver badges21 bronze badges
$begingroup$
What aboutOuter
?
$endgroup$
– chuy
Jun 20 at 19:31
$begingroup$
@chuy Thanks! butOuter
may not be a good fit whena,b ...
are matrices.
$endgroup$
– egwene sedai
Jun 20 at 19:35
$begingroup$
Just realized thatp = a, b, c; Distribute[f[p, p], List]
works
$endgroup$
– egwene sedai
Jun 20 at 19:44
add a comment |
$begingroup$
What aboutOuter
?
$endgroup$
– chuy
Jun 20 at 19:31
$begingroup$
@chuy Thanks! butOuter
may not be a good fit whena,b ...
are matrices.
$endgroup$
– egwene sedai
Jun 20 at 19:35
$begingroup$
Just realized thatp = a, b, c; Distribute[f[p, p], List]
works
$endgroup$
– egwene sedai
Jun 20 at 19:44
$begingroup$
What about
Outer
?$endgroup$
– chuy
Jun 20 at 19:31
$begingroup$
What about
Outer
?$endgroup$
– chuy
Jun 20 at 19:31
$begingroup$
@chuy Thanks! but
Outer
may not be a good fit when a,b ...
are matrices.$endgroup$
– egwene sedai
Jun 20 at 19:35
$begingroup$
@chuy Thanks! but
Outer
may not be a good fit when a,b ...
are matrices.$endgroup$
– egwene sedai
Jun 20 at 19:35
$begingroup$
Just realized that
p = a, b, c; Distribute[f[p, p], List]
works$endgroup$
– egwene sedai
Jun 20 at 19:44
$begingroup$
Just realized that
p = a, b, c; Distribute[f[p, p], List]
works$endgroup$
– egwene sedai
Jun 20 at 19:44
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
You can use Tuples
:
Tuples[f[a, b, c, a, b, c]]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a],
f[c, b], f[c, c]
f @@@ Tuples[a, b, c, 2]
same result
Tuples[f[a, b, r, s, t, x, y]]
f[a, r, x], f[a, r, y], f[a, s, x], f[a, s, y], f[a, t, x],
f[a, t, y], f[b, r, x], f[b, r, y], f[b, s, x], f[b, s, y],
f[b, t, x], f[b, t, y]
f @@@ Tuples[a, b, r, s, t, x, y]
same result
p = a, b;
p1 = a, a, b, b;
Tuples[f[p, p1]]
f[a, a], f[a, a], f[a, b], f[a, b], f[b, a], f[b, a], f[b, b],
f[b, b]
$endgroup$
$begingroup$
Oops, might need to be changed whena,b,c
are matrices?
$endgroup$
– egwene sedai
Jun 20 at 19:16
$begingroup$
Thanks! But when I use e.g. 2x2 matrices fora, b, c
,p=a,b,c
, thenTuples[KroneckerProduct[p, p]] // Dimensions
is262144, 9, 4
, and does not give 9 4-by-4 matrices...
$endgroup$
– egwene sedai
Jun 20 at 19:26
2
$begingroup$
@egwenesedai, doesKroneckerProduct@@@Tuples[p, 2]
work?
$endgroup$
– kglr
Jun 20 at 19:28
$begingroup$
Works, thanks a lot!
$endgroup$
– egwene sedai
Jun 20 at 19:29
2
$begingroup$
you can also useTuples[kp[p, p]] /. kp -> KroneckerProduct
(to preventKroneckerProduct
evaluating before Tuples does its job)
$endgroup$
– kglr
Jun 20 at 19:31
add a comment |
$begingroup$
You could also use Tuples
as follows:
Tuples[f[a,b,c], 2]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a], f[c, b],
f[c, c]
If f
evaluates, and you want to do this for matrices, you could do:
p = RandomInteger[1, 3, 2, 2];
Block[KroneckerProduct, Tuples[KroneckerProduct @@ p, 2]] //Dimensions
9, 4, 4
$endgroup$
$begingroup$
Thanks! That's one clever use forBlock
$endgroup$
– egwene sedai
Jun 21 at 21:33
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f200730%2fiterate-mapthread-with-matrices%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You can use Tuples
:
Tuples[f[a, b, c, a, b, c]]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a],
f[c, b], f[c, c]
f @@@ Tuples[a, b, c, 2]
same result
Tuples[f[a, b, r, s, t, x, y]]
f[a, r, x], f[a, r, y], f[a, s, x], f[a, s, y], f[a, t, x],
f[a, t, y], f[b, r, x], f[b, r, y], f[b, s, x], f[b, s, y],
f[b, t, x], f[b, t, y]
f @@@ Tuples[a, b, r, s, t, x, y]
same result
p = a, b;
p1 = a, a, b, b;
Tuples[f[p, p1]]
f[a, a], f[a, a], f[a, b], f[a, b], f[b, a], f[b, a], f[b, b],
f[b, b]
$endgroup$
$begingroup$
Oops, might need to be changed whena,b,c
are matrices?
$endgroup$
– egwene sedai
Jun 20 at 19:16
$begingroup$
Thanks! But when I use e.g. 2x2 matrices fora, b, c
,p=a,b,c
, thenTuples[KroneckerProduct[p, p]] // Dimensions
is262144, 9, 4
, and does not give 9 4-by-4 matrices...
$endgroup$
– egwene sedai
Jun 20 at 19:26
2
$begingroup$
@egwenesedai, doesKroneckerProduct@@@Tuples[p, 2]
work?
$endgroup$
– kglr
Jun 20 at 19:28
$begingroup$
Works, thanks a lot!
$endgroup$
– egwene sedai
Jun 20 at 19:29
2
$begingroup$
you can also useTuples[kp[p, p]] /. kp -> KroneckerProduct
(to preventKroneckerProduct
evaluating before Tuples does its job)
$endgroup$
– kglr
Jun 20 at 19:31
add a comment |
$begingroup$
You can use Tuples
:
Tuples[f[a, b, c, a, b, c]]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a],
f[c, b], f[c, c]
f @@@ Tuples[a, b, c, 2]
same result
Tuples[f[a, b, r, s, t, x, y]]
f[a, r, x], f[a, r, y], f[a, s, x], f[a, s, y], f[a, t, x],
f[a, t, y], f[b, r, x], f[b, r, y], f[b, s, x], f[b, s, y],
f[b, t, x], f[b, t, y]
f @@@ Tuples[a, b, r, s, t, x, y]
same result
p = a, b;
p1 = a, a, b, b;
Tuples[f[p, p1]]
f[a, a], f[a, a], f[a, b], f[a, b], f[b, a], f[b, a], f[b, b],
f[b, b]
$endgroup$
$begingroup$
Oops, might need to be changed whena,b,c
are matrices?
$endgroup$
– egwene sedai
Jun 20 at 19:16
$begingroup$
Thanks! But when I use e.g. 2x2 matrices fora, b, c
,p=a,b,c
, thenTuples[KroneckerProduct[p, p]] // Dimensions
is262144, 9, 4
, and does not give 9 4-by-4 matrices...
$endgroup$
– egwene sedai
Jun 20 at 19:26
2
$begingroup$
@egwenesedai, doesKroneckerProduct@@@Tuples[p, 2]
work?
$endgroup$
– kglr
Jun 20 at 19:28
$begingroup$
Works, thanks a lot!
$endgroup$
– egwene sedai
Jun 20 at 19:29
2
$begingroup$
you can also useTuples[kp[p, p]] /. kp -> KroneckerProduct
(to preventKroneckerProduct
evaluating before Tuples does its job)
$endgroup$
– kglr
Jun 20 at 19:31
add a comment |
$begingroup$
You can use Tuples
:
Tuples[f[a, b, c, a, b, c]]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a],
f[c, b], f[c, c]
f @@@ Tuples[a, b, c, 2]
same result
Tuples[f[a, b, r, s, t, x, y]]
f[a, r, x], f[a, r, y], f[a, s, x], f[a, s, y], f[a, t, x],
f[a, t, y], f[b, r, x], f[b, r, y], f[b, s, x], f[b, s, y],
f[b, t, x], f[b, t, y]
f @@@ Tuples[a, b, r, s, t, x, y]
same result
p = a, b;
p1 = a, a, b, b;
Tuples[f[p, p1]]
f[a, a], f[a, a], f[a, b], f[a, b], f[b, a], f[b, a], f[b, b],
f[b, b]
$endgroup$
You can use Tuples
:
Tuples[f[a, b, c, a, b, c]]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a],
f[c, b], f[c, c]
f @@@ Tuples[a, b, c, 2]
same result
Tuples[f[a, b, r, s, t, x, y]]
f[a, r, x], f[a, r, y], f[a, s, x], f[a, s, y], f[a, t, x],
f[a, t, y], f[b, r, x], f[b, r, y], f[b, s, x], f[b, s, y],
f[b, t, x], f[b, t, y]
f @@@ Tuples[a, b, r, s, t, x, y]
same result
p = a, b;
p1 = a, a, b, b;
Tuples[f[p, p1]]
f[a, a], f[a, a], f[a, b], f[a, b], f[b, a], f[b, a], f[b, b],
f[b, b]
edited Jun 20 at 19:18
answered Jun 20 at 19:13
kglrkglr
201k10 gold badges230 silver badges458 bronze badges
201k10 gold badges230 silver badges458 bronze badges
$begingroup$
Oops, might need to be changed whena,b,c
are matrices?
$endgroup$
– egwene sedai
Jun 20 at 19:16
$begingroup$
Thanks! But when I use e.g. 2x2 matrices fora, b, c
,p=a,b,c
, thenTuples[KroneckerProduct[p, p]] // Dimensions
is262144, 9, 4
, and does not give 9 4-by-4 matrices...
$endgroup$
– egwene sedai
Jun 20 at 19:26
2
$begingroup$
@egwenesedai, doesKroneckerProduct@@@Tuples[p, 2]
work?
$endgroup$
– kglr
Jun 20 at 19:28
$begingroup$
Works, thanks a lot!
$endgroup$
– egwene sedai
Jun 20 at 19:29
2
$begingroup$
you can also useTuples[kp[p, p]] /. kp -> KroneckerProduct
(to preventKroneckerProduct
evaluating before Tuples does its job)
$endgroup$
– kglr
Jun 20 at 19:31
add a comment |
$begingroup$
Oops, might need to be changed whena,b,c
are matrices?
$endgroup$
– egwene sedai
Jun 20 at 19:16
$begingroup$
Thanks! But when I use e.g. 2x2 matrices fora, b, c
,p=a,b,c
, thenTuples[KroneckerProduct[p, p]] // Dimensions
is262144, 9, 4
, and does not give 9 4-by-4 matrices...
$endgroup$
– egwene sedai
Jun 20 at 19:26
2
$begingroup$
@egwenesedai, doesKroneckerProduct@@@Tuples[p, 2]
work?
$endgroup$
– kglr
Jun 20 at 19:28
$begingroup$
Works, thanks a lot!
$endgroup$
– egwene sedai
Jun 20 at 19:29
2
$begingroup$
you can also useTuples[kp[p, p]] /. kp -> KroneckerProduct
(to preventKroneckerProduct
evaluating before Tuples does its job)
$endgroup$
– kglr
Jun 20 at 19:31
$begingroup$
Oops, might need to be changed when
a,b,c
are matrices?$endgroup$
– egwene sedai
Jun 20 at 19:16
$begingroup$
Oops, might need to be changed when
a,b,c
are matrices?$endgroup$
– egwene sedai
Jun 20 at 19:16
$begingroup$
Thanks! But when I use e.g. 2x2 matrices for
a, b, c
, p=a,b,c
, then Tuples[KroneckerProduct[p, p]] // Dimensions
is 262144, 9, 4
, and does not give 9 4-by-4 matrices...$endgroup$
– egwene sedai
Jun 20 at 19:26
$begingroup$
Thanks! But when I use e.g. 2x2 matrices for
a, b, c
, p=a,b,c
, then Tuples[KroneckerProduct[p, p]] // Dimensions
is 262144, 9, 4
, and does not give 9 4-by-4 matrices...$endgroup$
– egwene sedai
Jun 20 at 19:26
2
2
$begingroup$
@egwenesedai, does
KroneckerProduct@@@Tuples[p, 2]
work?$endgroup$
– kglr
Jun 20 at 19:28
$begingroup$
@egwenesedai, does
KroneckerProduct@@@Tuples[p, 2]
work?$endgroup$
– kglr
Jun 20 at 19:28
$begingroup$
Works, thanks a lot!
$endgroup$
– egwene sedai
Jun 20 at 19:29
$begingroup$
Works, thanks a lot!
$endgroup$
– egwene sedai
Jun 20 at 19:29
2
2
$begingroup$
you can also use
Tuples[kp[p, p]] /. kp -> KroneckerProduct
(to prevent KroneckerProduct
evaluating before Tuples does its job)$endgroup$
– kglr
Jun 20 at 19:31
$begingroup$
you can also use
Tuples[kp[p, p]] /. kp -> KroneckerProduct
(to prevent KroneckerProduct
evaluating before Tuples does its job)$endgroup$
– kglr
Jun 20 at 19:31
add a comment |
$begingroup$
You could also use Tuples
as follows:
Tuples[f[a,b,c], 2]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a], f[c, b],
f[c, c]
If f
evaluates, and you want to do this for matrices, you could do:
p = RandomInteger[1, 3, 2, 2];
Block[KroneckerProduct, Tuples[KroneckerProduct @@ p, 2]] //Dimensions
9, 4, 4
$endgroup$
$begingroup$
Thanks! That's one clever use forBlock
$endgroup$
– egwene sedai
Jun 21 at 21:33
add a comment |
$begingroup$
You could also use Tuples
as follows:
Tuples[f[a,b,c], 2]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a], f[c, b],
f[c, c]
If f
evaluates, and you want to do this for matrices, you could do:
p = RandomInteger[1, 3, 2, 2];
Block[KroneckerProduct, Tuples[KroneckerProduct @@ p, 2]] //Dimensions
9, 4, 4
$endgroup$
$begingroup$
Thanks! That's one clever use forBlock
$endgroup$
– egwene sedai
Jun 21 at 21:33
add a comment |
$begingroup$
You could also use Tuples
as follows:
Tuples[f[a,b,c], 2]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a], f[c, b],
f[c, c]
If f
evaluates, and you want to do this for matrices, you could do:
p = RandomInteger[1, 3, 2, 2];
Block[KroneckerProduct, Tuples[KroneckerProduct @@ p, 2]] //Dimensions
9, 4, 4
$endgroup$
You could also use Tuples
as follows:
Tuples[f[a,b,c], 2]
f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a], f[c, b],
f[c, c]
If f
evaluates, and you want to do this for matrices, you could do:
p = RandomInteger[1, 3, 2, 2];
Block[KroneckerProduct, Tuples[KroneckerProduct @@ p, 2]] //Dimensions
9, 4, 4
answered Jun 20 at 20:47
Carl WollCarl Woll
86k3 gold badges110 silver badges220 bronze badges
86k3 gold badges110 silver badges220 bronze badges
$begingroup$
Thanks! That's one clever use forBlock
$endgroup$
– egwene sedai
Jun 21 at 21:33
add a comment |
$begingroup$
Thanks! That's one clever use forBlock
$endgroup$
– egwene sedai
Jun 21 at 21:33
$begingroup$
Thanks! That's one clever use for
Block
$endgroup$
– egwene sedai
Jun 21 at 21:33
$begingroup$
Thanks! That's one clever use for
Block
$endgroup$
– egwene sedai
Jun 21 at 21:33
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f200730%2fiterate-mapthread-with-matrices%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
What about
Outer
?$endgroup$
– chuy
Jun 20 at 19:31
$begingroup$
@chuy Thanks! but
Outer
may not be a good fit whena,b ...
are matrices.$endgroup$
– egwene sedai
Jun 20 at 19:35
$begingroup$
Just realized that
p = a, b, c; Distribute[f[p, p], List]
works$endgroup$
– egwene sedai
Jun 20 at 19:44