[GiNaC-list] (no subject)
Bruce.Westbury at warwick.ac.uk
Fri Nov 28 10:37:19 CET 2008
I am getting started with GiNaC. I tried using evalm() and naively assumed that evaluating an expression involving matrices would return a matrix. It looks like a matrix but for instance the line below with A(0,0) causes an error. If I change "ex A" to "matrix A" it also causes an error. Could someone explain this please? Also, have I missed something? or do I have to use mul add sub?
S1 = q, 0, 1, -1/q;
S2 = -1/q, 1, 0, q;
ex A = evalm(S1*S2*S1-S2*S1*S2);
cout << endl << A << endl;
cout << endl << A(0,0) << endl;
cout << endl << A.is_zero_matrix() << endl;
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the GiNaC-list