%mat_input.m % %Routine to input matrix elements of generating matrices. Elements are %entered subsequently and the whole symbolic matrix will be saved as %'M<x>.mat' with <x> the number of the generating matrix to be entered % %input: M<ij> ... matrix elements % nr ... generator # %output: M ... entered generating matrix clc; close all; clear all; rep = 1; while rep clear all; M = sym([]);%initialize symbolic matrix for l = 1:3 for k = 1:3 t = sym(input(['M_',num2str(l),num2str(k),' = ']));%input matrix element if isempty(t),t=sym(0);end; M(l,k) = t; end; end; disp(' '); disp('M = '); disp(M); disp(' '); nr = input('Generator Nr.: '); if ~isempty(nr)%don't save if nothing is entered save(['M',num2str(nr)],'M');%save generating matrix end; rep = input('Repeat (default = 1):'); if isempty(rep),rep=1;end; end;