function [RMS] = LWBRMSiter(filename,maxiter)

   load(filename,'-mat');                     %image loaded as obj
   [npixels nangles] = size(obj);             %numbers of rows and columns 
   data = project2D(obj,nangles);
   
   alpha = powermethod_LW(npixels,nangles);   %uses obj to estimate relaxation parameter
   iold = backproject2D(data);     
   
   for i = 1:maxiter
    
       fprintf('Landweber iteration [%g] \n',i);
       ptemp = project2D(iold,nangles);
       diff = data - ptemp;
       itemp = alpha.*backproject2D(diff);
       inew = iold + itemp;
       iold = inew;
       predata = project2D(inew,nangles);
       dif = data - predata;
       RMS(i) = norm(dif,2)/sqrt(npixels*nangles);
   end
   
   index = 1:1:maxiter;
   f1 = figure('Visible','on','Position',[300,200,600,800]);
   plot(index,RMS,'-b','Linewidth',2)
   
   
   