function sol=fmg1(f,nu0,nu1,nu2) % % FMG1: recursive fmg as on page 49, but still using the simple % data structure which allocates and dealloctes memory a lot. % lmin=3; nt=length(f); l=log2(nt-1); if l==lmin v=zeros(nt,1); else fc=ftoc(f); vc=fmg1(fc,nu0,nu1,nu2); v=ctof(vc); end for i=1:nu0 v=vcycle1(v,f,nu1,nu2); end sol=v;