How do I transform an array into the Traditional Form with mathematica?

252 Views Asked by At

I am trying to set an expression in Mathematica that uses an array. However it is problematic to typeset this expression and still be able to use it.

Here is my example:

data := {{8.2, 123.2}, {8.2, 123.2}, {8.22, 121.8}}
addata := {0.03, 0.3}
Fkt[c_, d_, e_] := Product[c[[dim]]* d[[dim]]* e[[dim]]], {dim, 1, 2}]
Fkt[data, data, addata]

Now I want to show the expression only in itself, e.g.:

$Fkt_{c,d, e} := \Pi_{dim=1}^2 c_{dim}*d_{dim}* e_{dim}$

However TraditionalForm does not do this. Can anyone give me a pointer in the right direction?

thanks

2

There are 2 best solutions below

5
On BEST ANSWER

You can choose an option in the format->cell and cell->convert to as how to display your cells. Besides Shift+Ctrl+T gives the traditional form of a choosen fragment.

There is also Defer function, which prints the unevaluated form of an expression:

Defer[Product[c[[dim]]*d[[dim]]*e[[dim]], {dim, 1, 2}]]

gives

$\prod _{\dim =1}^2 c[[\dim ]] d[[\dim ]] e[[\dim ]]\ $.

0
On

Perhaps you would like:

Definition[Fkt] // TraditionalForm

enter image description here

Also, if you would like to change the default TraditionalForm display, for example, displaying Part expressions as subscripts, you may use:

Unprotect[Part]
Format[Unevaluated@Part[a_, b_], TraditionalForm] := Subscript[a, b]

Now:

Definition[Fkt] // TraditionalForm

enter image description here