Tag Info

New answers tagged

2

M = {{1, 3, 3}, {3, 4, 4}, {5, 5, 5}} {{1, 3, 3}, {3, 4, 4}, {5, 5, 5}} P = {{1, 2, 6}, {3, 6, 4}, {5, 9, 5}} {{1, 2, 6}, {3, 6, 4}, {5, 9, 5}} M.P {{25, 47, 33}, {35, 66, 54}, {45, 85, 75}} Or, if you want the nice display be sure not to include that in the definition of your matrix MatrixForm[M = {{1, 3, 3}, {3, 4, 4}, {5, 5, 5}}] ...


7

To expand my comment into an answer: HoldForm[X[x, y, z]] == X[x, y, z] // TraditionalForm $$X(x,y,z)=\left( \left\{ \begin{array}{cc} \frac{3}{4 \pi } & \sqrt{x^2+y^2+z^2}\leq 1 \\ 0 & \text{True} \\ \end{array} \right. \right)$$ But Mathematica decides it needs parentheses. I agree that this doesn't look ideal. There are a couple of ways ...


2

One can use $Pre and CellTags SetAttributes[verbose, HoldAll]; verbose@expr_ := Module[{res = expr}, If[res =!= Null, CellPrint@Cell[BoxData@ToBoxes@res, "Output", CellTags -> "ans =", ShowCellTags -> True]]]; HoldPattern@verbose@Set[lhs_, rhs_] := CellPrint@Cell[BoxData@ToBoxes[lhs = rhs], "Output", CellTags -> ...



Top 50 recent answers are included