You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: DenoisingProblem.m
    path of file: ./repos/Swan/ImageProcessing
    
    the code of the file until where you have to start completion: classdef DenoisingProblem < handle
    
    properties (GetAccess = public, SetAccess = private)
        optimizedImage
        plottingData
    end
    
    properties (Access = private)
        originalImage
        imageSize
        discreteGradient
        noisyImage
        noisyImageNorm
        
        optimizer
        designVariable
       
    
function solve(obj)
            while obj.iterator.hasNotFinished()
                obj.optimizer.update();
                obj.designVariable.update();
                obj.energyFunction.computeCost();
                obj.computeU();
                obj.computeDualGap();
                obj.updatePlottingData();
                obj.iterator.update;
            end
        end
        
    end
    
    methods (Access = private)
        
        function updatePlottingData(obj)
            p = obj.plottingData;
            i = obj.iterator.value;
            p.cost(i) = obj.energyFunction.value;
            p.dualGap(i) = obj.dualGap; 
            obj.plottingData = p;
        end
        
        function init(obj,cParams)
            im = obj.readImage(cParams);
            obj.computeImageSize(im);
            obj.transformImageInVectorForm(im)
            obj.lambda = cParams.totalVariationWeigth;
        end
        
        function computeImageSize(obj,image)
            [m,n] = size(image);
            obj.imageSize.rows = m;
            obj.imageSize.columns = n;
            obj.imageSize.rowsTimesColumns = m*n;
        end