<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE></TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>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?<BR>
<BR>
matrix S1(2,2);<BR>
S1 = q, 0, 1, -1/q;<BR>
matrix S2(2,2);<BR>
S2 = -1/q, 1, 0, q;<BR>
<BR>
<BR>
ex A = evalm(S1*S2*S1-S2*S1*S2);<BR>
cout << endl << A << endl;<BR>
cout << endl << A(0,0) << endl;<BR>
cout << endl << A.is_zero_matrix() << endl;<BR>
<BR>
Bruce Westbury<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>