Tag Info

New answers tagged

2

tab = Table[{x[n], y[n], z[n]}, {n, 4}] {{x[1], y[1], z[1]}, {x[2], y[2], z[2]}, {x[3], y[3], z[3]}, {x[4], y[4], z[4]}} ParallelMap[{#, f[##2]} & @@ # &, tab] {{x[1], f[y[1], z[1]]}, {x[2], f[y[2], z[2]]}, {x[3], f[y[3], z[3]]}, {x[4], f[y[4], z[4]]}} See Apply and SlotSequence for clarification.


4

Calling tab = {{x1,y1,z1},{x2,y2,z2},{xn,yn,zn}}; We have ParallelMap[{First[#], f @@ Rest[#]} &, tab]


4

You can pad missed elements and add a transposed matrix M = # + ConjugateTranspose@UpperTriangularize[#, 1] &@PadLeft@halfM; M // MatrixForm


2

It is easiest when each options controls something that is more or less independent of other options. If as in your example each combination of options results in (the need for) a different subroutine things do get complicated. A basic strategy is to look for repetitions segments of code an replace them with a single copy. For example in your ...



Top 50 recent answers are included