Examples   = LoadExampleDefinitions;
Params.ExampleName = 'LRRS_Gaussian_rank1_noisy_n2_40';
ExampleIdx = SelectExample(Params,Examples);
Example    = Examples{ExampleIdx};
%% Choose algorithmic parameters


paras_experiment = struct;
paras_experiment.name = 'SNR';
paras_experiment.values = logspace(-1,16,18);  %logspace(2,3,2);

instancesize = 1;
Example.opts.n_jobs = 1;
Example.optsfct.parallel = false;
Example.opts.N0          = 100;
Example.opts.verbose   = false;
% Example.opts.pencil_para = [3,4];
Example.prob.add_noise = true;
Example.optsfct.verbose   = false;
Example.alg_name = {'RiemannianIHT_adap','SparsePowerFactorization','IRLS-LRRS'};
Example.samplemodel.oversampling = 3;
% if nargin > 6   
%     changesstruc = varargin{1};
%     names1 = fieldnames(changesstruc);
%     nrfields = length(names1);
%     for l = 1:nrfields
%         if isstruct(changesstruc.(names1{l}))
%             names2 = fieldnames(changesstruc.(names1{l}));
%             for ll = 1:length(names2)
%                 Example.(names1{l}).(names2{ll}) = changesstruc.(names1{l}).(names2{ll});
%             end
%         else
%             Example.(names1{l}) = changesstruc.(names1{l});
%         end
%     end
% end
option = [];
option = 'loglog';
filename_note={'prob','r'};
resultname = 'avg_error_rel';
resulttext = 'Avg. rel. Frobenius error';
wrapper_experiment_LRRS(Example,...
    paras_experiment,instancesize,resultname,resulttext,option,filename_note);