Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
/* * This file: * http://anggtwu.net/MAXIMA/mkmatrix1.mac.html * http://anggtwu.net/MAXIMA/mkmatrix1.mac * (find-angg "MAXIMA/mkmatrix1.mac") * Author: Eduardo Ochs <eduardoochs@gmail.com> * * See: (find-es "maxima" "aroundx0y0") * * (defun e () (interactive) (find-angg "MAXIMA/mkmatrix1.mac")) * (defun o () (interactive) (find-angg "MAXIMA/matrixify.mac")) */ mklist0 (xs, expr) := buildq([xs, expr], makelist(expr, splice(xs))); mkhmatrix0(xs, expr) := buildq([xs, expr], apply(matrix, [makelist(expr, splice(xs))])); mkvmatrix0(ys, expr) := buildq([ys, expr], transpose(apply(matrix, [makelist(expr, splice(ys))]))); mkmatrix0 (xs, ys, expr) := buildq([xs, ys, expr], apply(matrix, makelist(makelist(expr, splice(xs)), splice(ys)))); mklist (xs, expr) ::= mklist0 (xs, expr); mkhmatrix(xs, expr) ::= mkhmatrix0(xs, expr); mkvmatrix( ys, expr) ::= mkvmatrix0( ys, expr); mkmatrix (xs, ys, expr) ::= mkmatrix0 (xs, ys, expr); /* * (eepitch-maxima) * (eepitch-kill) * (eepitch-maxima) ** (find-angg "MAXIMA/mkmatrix1.mac") load ("~/MAXIMA/mkmatrix1.mac"); mkhmatrix([x,2,5], x); mkvmatrix([y,2,5], y); mkvmatrix([y,5,2,-1], y); mkmatrix0([x,0,2], [y,4,5], [x,y]); mkmatrix0([x,0,2], [y,5,4,-1], [x,y]); mkmatrix ([x,0,2], [y,5,4,-1], [x,y]); diffxnyn(f, xn, yn) := diff(diff(f, x, xn), y, yn); mkmatrix([xn,0,4], [yn,3,0,-1], [xn,yn]); mkmatrix([xn,0,2], [yn,2,0,-1], diffxnyn(F(x,y), xn, yn)); mkmatrix([xn,0,3], [yn,3,0,-1], diffxnyn(x^2*y^2, xn, yn)); mkmatrix([xn,0,3], [yn,3,0,-1], at(diffxnyn(x^2*y^2, xn, yn), [x=0,y=0])); mkmatrix([xn,0,3], [yn,3,0,-1], diffxnyn((x-x0)^2*(y-y0)^2, xn, yn)); mkmatrix([xn,0,3], [yn,3,0,-1], at(diffxnyn((x-x0)^2*(y-y0)^2, xn, yn), [x=x0,y=y0])); aroundx0y0(expr) ::= mkmatrix0([x,2,4], [y,3,1,-1], expr); aroundx0y0([x,y]); [x0,y0] : [3, 2]; [Dx,Dy] : [x-x0, y-y0]; aroundx0y0(ev(Dx)); "3hT102"; mkmatrix([x,0,4], [y,3,0,-1], [x,y]); mkmatrix([x,2,4], [y,3,1,-1], [x,y]); aroundx0y0(ev([x,y])); aroundx0y0(ev(Dx^2)); aroundx0y0(ev(Dy^2)); aroundx0y0(ev(Dx^2+Dy^2)); aroundx0y0(ev(Dx^2-Dy^2)); aroundx0y0(ev(Dx*Dy)); aroundx0y0(ev(2+Dx^2)); aroundx0y0(ev(2+Dy^2)); aroundx0y0(ev(2+Dx^2+Dy^2)); aroundx0y0(ev(2+Dx^2-Dy^2)); aroundx0y0(ev(2+Dx*Dy)); */ /* * Local Variables: * coding: utf-8-unix * End: */