Declare matrix with real elements



Try removing declare(M,nonscalar); then

(%i1) map('conjugate, [M,M[1,1], M[%i,42]]);
(%o1) [M,M[1,1],M[%i,42]]

I'm don't know everything that declare(M,nonscalar) does, but declaring something
to be nonscalar mostly changes the way an expression involving noncommutative 
multiplication simplifies. The conjugate code has various checks for nonscalar
atoms--maybe these checks are silly (I can say that because I wrote the conjugate 
code :) 


--Barton

-----maxima-bounces at math.utexas.edu wrote: -----

>To:?maxima at math.utexas.edu
>From:?"Michele?Dall'Arno"?<michele.dallarno at gmail.com>
>Sent?by:?maxima-bounces at math.utexas.edu
>Date:?07/13/2011?08:34AM
>Subject:?[Maxima]?Declare?matrix?with?real?elements
>
>Dear?all,
>
>in?my?Maxima?code?I?need?a?matrix?M?of?real?parameters:
>
>declare(M,?nonscalar);
>done
>
>Then?I?use?such?real?parameters,?for?example:
>
>x?:?conjugate(M[1,1]);
>conjugate(M[1,1])
>
>How?can?I?tell?Maxima?that?all?the?elements?of?M?are?real,?such?that
>conjugate(M[i,j])?=?M[i,j]?for?any?i,j?
>
>Thank?you?in?advance,
>
>Michele
>_______________________________________________
>Maxima?mailing?list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima