%Copyright (C) 2012-2018 Jan Christian Rohde
%
%This file is part of MACE.
%
%MACE is free software; you can redistribute it and/or modify it under the terms of the
%GNU General Public License as published by the Free Software Foundation; either version 3
%of the License, or (at your option) any later version.
%
%MACE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
%even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%GNU General Public License for more details.
%
%You should have received a copy of the GNU General Public License
%along with MACE; if not, see http://www.gnu.org/licenses.
% This example shows how to use scripting for matrices
% All the operations below can also be done with the input editor.
setCharacteristic(0)
% First construct the matrix.
m=zeroMatrix(3,3):
m=setEntry(m,1,2,3.14):
n=diagMatrix(3,1):
m=m+n:
% Perform some operations.
printMatrix(m):
charPoly(m):
miniPoly(m):
getEntry(m,1,2):
% Write the matrix to use it in the main program.
writeMatrix(m)