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: cvglmnetPlot.m
    path of file: ./repos/Image-Harmonization-Dataset-iHarmony4/Xue et al/demo/glmnet
    
    the code of the file until where you have to start completion: function cvglmnetPlot(CVglmnet)
% Plot MSE w. errorbars for a cross validation fit of glmnet
% Call: cvglmnetPlot(CVglmnet)
%   CVglmnet: output from cvglmnet(...) function
    errorbar(log(CVglmnet.glmnetOptions.lambda),CVglmnet.cvm,CVglmnet.stderr,'linewidth',2)
    hold on
    plot(log(CVglmnet.glmnetOptions.lambda),CVglmnet.cvm,'r-o','linewidth',2)
    [val idx2] = min(fliplr(CVglmnet.cvm));

    
function cvglmnetPlot(CVglmnet)
% Plot MSE w. errorbars for a cross validation fit of glmnet
% Call: cvglmnetPlot(CVglmnet)
%   CVglmnet: output from cvglmnet(...) function
    errorbar(log(CVglmnet.glmnetOptions.lambda),CVglmnet.cvm,CVglmnet.stderr,'linewidth',2)
    hold on
    plot(log(CVglmnet.glmnetOptions.lambda),CVglmnet.cvm,'r-o','linewidth',2)
    [val idx2] = min(fliplr(CVglmnet.cvm));
    vals=flipud(log(CVglmnet.glmnetOptions.lambda));
    plot(log([CVglmnet.lambda_min CVglmnet.lambda_min]),[min([CVglmnet.cvlo CVglmnet.cvup]) max([CVglmnet.cvlo CVglmnet.cvup])],'g--',...
        'linewidth',3)
    if CVglmnet.lambda_min ~=CVglmnet.lambda_1se
        plot(log([CVglmnet.lambda_1se CVglmnet.lambda_1se]),[min([CVglmnet.cvlo CVglmnet.cvup]) max([CVglmnet.cvlo CVglmnet.cvup])],'k--',...
            'linewidth',3)
    end