|
From: Eduardo O. <edu...@gm...> - 2025-10-13 00:44:21
|
Hi Robert,
you're right! My first thoughts were buggy and I misinterpreted the
order of execution... here is a way to put a matrix without borders in
a cell of a normal matrix. Code:
to_lisp();
(setf (get '$barematrix 'dimension) 'dim-$barematrix)
(defun dim-$barematrix (form result)
(let (($display_matrix_brackets nil))
(dim-$matrix form result)))
(to-maxima)
M1 : barematrix([a,b],[c,d]);
M2 : matrix([M1,e],[f,g]);
and output:
(%i4) M1 : barematrix([a,b],[c,d]);
a b
(%o4)
c d
(%i5) M2 : matrix([M1,e],[f,g]);
[ a b ]
[ e ]
(%o5) [ c d ]
[ ]
[ f g ]
(%i6)
Cheers =),
Eduardo
On Sun, 12 Oct 2025 at 19:50, Robert Dodier <rob...@gm...> wrote:
> On Sun, Oct 12, 2025 at 3:16 PM Eduardo Ochs <edu...@gm...>
> wrote:
> > I don't see a way to put a matrix without brackets inside a matrix
> > with brackets.
>
> The display flags affect all expressions being displayed, so all
> matrices are displayed the same, all boxes displayed the same, all
> determinants the same too. So the only way (short of reorganizing the
> code) to get one expression displayed with one set of display flags
> and another displayed with a different set is to define different
> operators. This isn't a very satisfactory solution because any new
> operators won't have the same properties (algebraic and otherwise) as
> the existing built-in operators.
>
|