function buttonloadconcentrationsCA4(hObject, eventdata, Empty_Button, Buttons, Footnote, AxesC, AxesA, AxesSOLC, AxesSOLA, Polysettings, uonoff, uonoffC, plotopt, lvText, lvSlider, lcs)

data = get(Empty_Button,'UserData');

data.givenc.s = 0;
data.givenc.is = 0;
data.givenc.C = [];
data.givenc.afs = [];

actpwd = pwd;
cd(data.PathName);
[FileName,PathName,FilterIndex] = uigetfile('*.mat','Select .mat file including concentration matrix C');
cd(actpwd);

if FilterIndex == 0
    set(hObject,'UserData',data);
    set(Footnote,'String',' Warning: concentration-loading process canceled.','ForegroundColor','red');
    fprintf('Warning: concentration-loading process canceled.\n');
    return
else
    load([PathName FileName]);
    if ~exist('c')
        if exist('C')
            c = C;
        end
    end
    
    if exist('c')
        if size(c,1) ~= size(data.D,1)
            if size(c,2) ~= size(data.D,1)
                c = c';
            end
        end
    else
        set(Footnote,'String',[' Warning: no matrix c in file "',FileName,'"'],'ForegroundColor','red');
        fprintf('Warning: no matrix c in file "%s".\n',FileName);
        return
    end
    if size(c,1) ~= size(data.D,1)
        set(Footnote,'String',[' Warning: matrix "c" of bad dimension: ', num2str(size(c,1)), ' x ', num2str(size(c,2))],'ForegroundColor','red');
        fprintf('Warning: matrix "c" of bad dimension: %d x %d.\n',size(c,1),size(c,2));
        return
    else
        data.givenc.s = size(c,2);
        data.givenc.line = (c*diag(1./max(c)))';
        data.givenc.afs = (pinv(data.U*data.S(:,1:data.s))*c)';
        for i=1:data.givenc.s
            AFS(i,:) = data.givenc.afs(i,2:4)/data.givenc.afs(i,1);
        end
        AFS = AFS*data.S(2:4,2:4)/data.S(1,1);
        data.givenc.afs = AFS;
        data.givenc.is = 1;
        if size(c,2) == 1
            set(Footnote,'String',[' Concentration import: ', num2str(size(c,2)), ' profile loaded. '],'ForegroundColor','k');
        else
            set(Footnote,'String',[' Concentration import: ', num2str(size(c,2)), ' profiles loaded. '],'ForegroundColor','k');
        end
    end
end

set(Empty_Button,'UserData',data);

if (data.motion == 0) && (data.motionC == 0)
    plotafsCA4(AxesA, AxesC, AxesSOLA, AxesSOLC, data.afsA, data.afsC, data.FIRPOLA, data.FIRPOLC, data.INNPOLA, data.INNPOLC, data.isFP, data.isIP, data.isAFS, lcs, [0 0 0], [-1 -1], plotopt);
    
    plotaddsCA4(AxesA, AxesC, AxesSOLA, AxesSOLC, data.afsA, data.afsC, data.fixA, data.fixC, data.U*data.S, data.V', data.choosen, data.x, data.t,...
    data.givena, data.givenc, data.S(2:4,2:4),data.S(1,1), [], [], [], [], lcs, [], [], plotopt, 0, 0, [])
else
    liveviewCA4(hObject, eventdata, Empty_Button, AxesC, AxesA, AxesSOLC, AxesSOLA, uonoff, uonoffC, plotopt, lvText, lvSlider, -1, lcs, [0 0 0])
end
