MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Working with arrays


Use a period instead of a CenterDot, as you did in the "Second case".

Cheers,
Kevin

On 6/16/2013 5:12 AM, amannucci wrote:
> I thought I understood variables. This sequence completely mystifies me:
> Clear[lA, xtest]
> lA = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
> xtest = {4, 5, 6};
> lA\[CenterDot]xtest (* First case *)
> {{a, b}, {c, d}} . {x, y} (* Second case *)
>
> The output is:
>
> {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}\[CenterDot]{4, 5, 6}
>
> {a x + b y, c x + d y}
>
> How do I force matrix multiplication to actually occur, as in the second answer? Why does Mathematica do the matrix multiply in the second case but not the first?
>
> Thanks for any help.
>
> -Tony
>



  • Prev by Date: Re: Working with arrays
  • Next by Date: Re: How does one get data out of a TemporalData object?
  • Previous by thread: Re: Working with arrays
  • Next by thread: Re: Working with arrays