Answer by Carl Woll for Change parentheses to square-brackets when using CForm
Mathematica's CForm will convert Part expressions to arrays, so you can achieve what you want by changing your functions to Part expressions:ReplaceAll[ HoldForm[T[0,0]+ht (-(T[-1,0]+T[0,0])...
View ArticleAnswer by MarcoB for Change parentheses to square-brackets when using CForm
Update:I haven't written any C in a long while, so I forgot its syntax for multidimensional arrays, i.e. array[first][second]! Here is the amended code:ToString[CForm[t[12, 156] + ht u[5,...
View ArticleChange parentheses to square-brackets when using CForm
I'm not experienced with Mathematica, but am learning to appreciate its awesome power for manipulations.I get the an expression like this when using CForm (I cut it short to simplify):T(0, 0) +...
View Article
More Pages to Explore .....