function [G, A] = GenBasis(dim, m1, derivatives, sigma) % This is function GenBasis % % Usage: [G, A] = GenBasis(dim, m1, derivatives, sigma) % % This function will generate a synthesis basis (G) and an % analysis basis (A). The basis functions of the synthesis % basis are described by the variables dim and m1 and by the % vectors derivatives and sigma. See 'help makeg' for details % of these variables. % % Written by Jeffrey A Bloom % % This function calls: % makeg.m % svdinvert.m % Calculate the G matrix G = makeg(dim, m1, derivatives, sigma); % Calculate the A matrix disp(' Inverting G to create A') [gtgi,CN] = svdinvert(G'*G); CNstring=[' Condition number is ',num2str(CN)]; disp(CNstring); A = ( gtgi*G' )';