1
$\begingroup$

When I do the Times operation among list like this {{a, b, e}, {c, d, f}}*{x, y, z}, the error message is given as Thread::tdlen: Objects of unequal length in {{a,b,e},{c,d,f}} {x,y,z} cannot be combined. Actually, the desired result should be {{a x, b y, e z}, {c x, d y, f z}}. Are there any bugs?

$\endgroup$
2
  • 3
    $\begingroup$ Inner[Times,{{a, b, e}, {c, d, f}},{x, y, z},List] would be one way. $\endgroup$
    – user1066
    Commented Jul 4, 2020 at 10:36
  • 1
    $\begingroup$ Another way Times[{x, y, z}, #] & /@ {{a, b, e}, {c, d, f}}. $\endgroup$ Commented Jul 4, 2020 at 15:22

0

Browse other questions tagged or ask your own question.