function [isocoeffs1,isocoeffs2,isocoeffs3]=isoanalysis(handles,coefflist,coeffs,clabelsmatrix)
[datadim,~]=dimsizetype(coeffs{1});
lev1iso=get(handles.checkbox21,'Value');
lev2iso=get(handles.checkbox22,'Value');
lev3iso=get(handles.checkbox23,'Value');
isotype1=get(handles.radiobutton7,'Value');
isotype2=get(handles.radiobutton8,'Value');
isotype3=get(handles.radiobutton9,'Value');
isotype4=get(handles.radiobutton10,'Value');
WTval=get(handles.popupmenu2,'String');
WT2val=WTval{get(handles.popupmenu2,'Value')};
if datadim~=3
    CoeffTypes=get(handles.popupmenu13,'String');
    if iscell(CoeffTypes)
        SelCoeffTypes=CoeffTypes{get(handles.popupmenu13,'Value')};
    else
        SelCoeffTypes=CoeffTypes;
    end
end
IsoIndDetail=[]; IsoIndLev=[];
% -------------------------------- 1D -------------------------------------
if datadim==1
    if strcmp(WT2val,'1D Continuous Wavelet Transform')
        [sizecoeffx,sizecoeffy]=size(coeffs{1});
        isocoeffs1=zeros(sizecoeffx,sizecoeffy);
        for i=1:length(coefflist)
            if isotype1==1
                isocoeffs1=isocoeffs1+coeffs{i};
            elseif isotype2==1
                isocoeffs1=isocoeffs1+coeffs{i}.^2;
            elseif isotype3==1
                isocoeffs1=isocoeffs1+abs(coeffs{i});
            elseif isotype4==1
                isocoeffs1=isocoeffs1+coeffs{i}.^2;
            end
        end
        if isotype2==1
            isocoeffs1=sqrt(isocoeffs);
        end
        isocoeffs2=[]; isocoeffs3=[];
    elseif (strcmp(WT2val,'1D Complex Wavelet Transform') || strcmp(WT2val,'1D Discrete Fractional Wavelet Transform') || strcmp(WT2val,'1D Discrete Fractional Wavelet Transform (causal)'))
        [sizex,sizey]=size(clabelsmatrix);
        if strcmp(SelCoeffTypes,'All detail coefficients')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All real')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Re');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Re');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Re');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All imaginary')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Im');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Im');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Im');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        end
    else
        if lev1iso==1
            for i=1:sizex
                for j=1:sizey
                    MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                    MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                    if ~isempty(MatchDetail)
                        IsoIndDetail=[IsoIndDetail; i j];
                    end
                    if ~isempty(MatchLev)
                        IsoIndLev=[IsoIndLev; i j];
                    end
                end
            end
            isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
        else
            isocoeffind1=[];
        end
        if lev2iso==1
            for i=1:sizex
                for j=1:sizey
                    MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                    MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                    if ~isempty(MatchDetail)
                        IsoIndDetail=[IsoIndDetail; i j];
                    end
                    if ~isempty(MatchLev)
                        IsoIndLev=[IsoIndLev; i j];
                    end
                end
            end
            isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
        else
            isocoeffind2=[];
        end
        if lev3iso==1
            for i=1:sizex
                for j=1:sizey
                    MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                    MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                    if ~isempty(MatchDetail)
                        IsoIndDetail=[IsoIndDetail; i j];
                    end
                    if ~isempty(MatchLev)
                        IsoIndLev=[IsoIndLev; i j];
                    end
                end
            end
            isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
        else
            isocoeffind3=[];
        end
    end
    % -------------------------------- 2D -------------------------------------
elseif datadim==2
    if (strcmp(WT2val,'2D Discrete Fractional Wavelet Transform') || strcmp(WT2val,'2D Discrete Fractional Wavelet Transform (causal)'))
        [sizex,sizey]=size(clabelsmatrix);
        if strcmp(SelCoeffTypes,'All detail coefficients')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All real')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Re');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Re');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Re');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All imaginary')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Im');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Im');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Im');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 1')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 2')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 3')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 3');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 3');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 3');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 4')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 4');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 4');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 4');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 5')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 5');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 5');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 5');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 6')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 6');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 6');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 6');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 1-2')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 3-4')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 3');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 4');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 3');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 4');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 3');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 4');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 5-6')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 5');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 6');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 5');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 6');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 5');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 6');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 1-4')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchDetail3=findstr(clabelsmatrix{i,j},'coeff. 3');
                        MatchDetail4=findstr(clabelsmatrix{i,j},'coeff. 4');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2) || ~isempty(MatchDetail3) || ~isempty(MatchDetail4))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchDetail3=findstr(clabelsmatrix{i,j},'coeff. 3');
                        MatchDetail4=findstr(clabelsmatrix{i,j},'coeff. 4');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2) || ~isempty(MatchDetail3) || ~isempty(MatchDetail4))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchDetail3=findstr(clabelsmatrix{i,j},'coeff. 3');
                        MatchDetail4=findstr(clabelsmatrix{i,j},'coeff. 4');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2) || ~isempty(MatchDetail3) || ~isempty(MatchDetail4))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        end
    elseif strcmp(WT2val,'2D Complex Wavelet Transform')
        [sizex,sizey]=size(clabelsmatrix);
        if strcmp(SelCoeffTypes,'All detail coefficients')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All real')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Re');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Re');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Re');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All imaginary')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Im');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Im');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'Im');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All horizontal')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'H');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'H');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'H');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All vertical')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All diagonal')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'D');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'D');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'D');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All horizontal & vertical')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'H');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'H');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'H');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail1) || ~isempty(MatchDetail2))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        end
    elseif strcmp(WT2val,'2D Quincunx Wavelet Transform')
        [sizex,sizey]=size(clabelsmatrix);
        if strcmp(SelCoeffTypes,'All detail coefficients')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 1')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 1');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All type 2')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'coeff. 2');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        end
    elseif strcmp(WT2val,'2D Discrete Multiwavelet Transform')
        for i=1:sizex
            for j=1:sizey
                MatchDetail5=findstr(clabelsmatrix{i,j},'coeff. 5');
                MatchDetail6=findstr(clabelsmatrix{i,j},'coeff. 6');
                MatchDetail7=findstr(clabelsmatrix{i,j},'coeff. 7');
                MatchDetail8=findstr(clabelsmatrix{i,j},'coeff. 8');
                MatchDetail9=findstr(clabelsmatrix{i,j},'coeff. 9');
                MatchDetail10=findstr(clabelsmatrix{i,j},'coeff. 10');
                MatchDetail11=findstr(clabelsmatrix{i,j},'coeff. 11');
                MatchDetail12=findstr(clabelsmatrix{i,j},'coeff. 12');
                MatchDetail13=findstr(clabelsmatrix{i,j},'coeff. 13');
                MatchDetail14=findstr(clabelsmatrix{i,j},'coeff. 14');
                MatchDetail15=findstr(clabelsmatrix{i,j},'coeff. 15');
                MatchDetail16=findstr(clabelsmatrix{i,j},'coeff. 16');
                if (~isempty(MatchDetail5) || ~isempty(MatchDetail6) || ~isempty(MatchDetail7)...
                        || ~isempty(MatchDetail8) || ~isempty(MatchDetail9) || ~isempty(MatchDetail10)...
                        || ~isempty(MatchDetail11) || ~isempty(MatchDetail12) || ~isempty(MatchDetail13)...
                        || ~isempty(MatchDetail14) || ~isempty(MatchDetail15) || ~isempty(MatchDetail16))
                    IsoIndDetail=[IsoIndDetail; i j];
                end
            end
        end
        isocoeffind1=IsoIndDetail; IsoIndDetail=[]; IsoIndLev=[];
    else
        [sizex,sizey]=size(clabelsmatrix);
        if strcmp(SelCoeffTypes,'All detail coefficients')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ~isempty(MatchDetail)
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All horizontal')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'H');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'H');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'H');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All vertical')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All diagonal')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'D');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'D');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail=findstr(clabelsmatrix{i,j},'D');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if (~isempty(MatchDetail) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        elseif strcmp(SelCoeffTypes,'All horizontal & vertical')
            if lev1iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'H');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                        if ((~isempty(MatchDetail1) || ~isempty(MatchDetail2)) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind1=[];
            end
            if lev2iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'H');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                        if ((~isempty(MatchDetail1) || ~isempty(MatchDetail2)) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind2=[];
            end
            if lev3iso==1
                for i=1:sizex
                    for j=1:sizey
                        MatchDetail1=findstr(clabelsmatrix{i,j},'H');
                        MatchDetail2=findstr(clabelsmatrix{i,j},'V');
                        MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                        if ((~isempty(MatchDetail1) || ~isempty(MatchDetail2)) && isempty(findstr(clabelsmatrix{i,j},'approx.')))
                            IsoIndDetail=[IsoIndDetail; i j];
                        end
                        if ~isempty(MatchLev)
                            IsoIndLev=[IsoIndLev; i j];
                        end
                    end
                end
                isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
            else
                isocoeffind3=[];
            end
        end
    end
% -------------------------------- 3D -------------------------------------
elseif datadim==3
    [sizex,sizey]=size(clabelsmatrix);
    if lev1iso==1
        for i=1:sizex
            for j=1:sizey
                MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                MatchLev=findstr(clabelsmatrix{i,j},'lev. 1');
                if ~isempty(MatchDetail)
                    IsoIndDetail=[IsoIndDetail; i j];
                end
                if ~isempty(MatchLev)
                    IsoIndLev=[IsoIndLev; i j];
                end
            end
        end
        isocoeffind1=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
    else
        isocoeffind1=[];
    end
    if lev2iso==1
        for i=1:sizex
            for j=1:sizey
                MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                MatchLev=findstr(clabelsmatrix{i,j},'lev. 2');
                if ~isempty(MatchDetail)
                    IsoIndDetail=[IsoIndDetail; i j];
                end
                if ~isempty(MatchLev)
                    IsoIndLev=[IsoIndLev; i j];
                end
            end
        end
        isocoeffind2=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
    else
        isocoeffind2=[];
    end
    if lev3iso==1
        for i=1:sizex
            for j=1:sizey
                MatchDetail=findstr(clabelsmatrix{i,j},'detail');
                MatchLev=findstr(clabelsmatrix{i,j},'lev. 3');
                if ~isempty(MatchDetail)
                    IsoIndDetail=[IsoIndDetail; i j];
                end
                if ~isempty(MatchLev)
                    IsoIndLev=[IsoIndLev; i j];
                end
            end
        end
        isocoeffind3=intersect(IsoIndDetail,IsoIndLev,'rows'); IsoIndDetail=[]; IsoIndLev=[];
    else
        isocoeffind3=[];
    end
end

if ~strcmp(WT2val,'1D Continuous Wavelet Transform')
if ~isempty(isocoeffind1)
    if datadim~=3
        [sizecoeffx,sizecoeffy]=size(coeffs{isocoeffind1(1,1),isocoeffind1(1,2)});
        isocoeffs1=zeros(sizecoeffx,sizecoeffy);
    else
        [sizecoeffx,sizecoeffy,sizecoeffz]=size(coeffs{isocoeffind1(1,1),isocoeffind1(1,2)});
        isocoeffs1=zeros(sizecoeffx,sizecoeffy,sizecoeffz);
    end
    for i=1:length(isocoeffind1)
        if isotype1==1
            isocoeffs1=isocoeffs1+coeffs{isocoeffind1(i,1),isocoeffind1(i,2)};
        elseif isotype2==1
            isocoeffs1=isocoeffs1+coeffs{isocoeffind1(i,1),isocoeffind1(i,2)}.^2;
        elseif isotype3==1
            isocoeffs1=isocoeffs1+abs(coeffs{isocoeffind1(i,1),isocoeffind1(i,2)});
        elseif isotype4==1
            isocoeffs1=isocoeffs1+coeffs{isocoeffind1(i,1),isocoeffind1(i,2)}.^2;
        end
        if isotype2==1
            isocoeffs1=sqrt(isocoeffs1);
        end
    end
else
    isocoeffs1=[];
end
if ~isempty(isocoeffind2)
    if datadim~=3
        [sizecoeffx,sizecoeffy]=size(coeffs{isocoeffind2(1,1),isocoeffind2(1,2)});
        isocoeffs2=zeros(sizecoeffx,sizecoeffy);
    else
        [sizecoeffx,sizecoeffy,sizecoeffz]=size(coeffs{isocoeffind2(1,1),isocoeffind2(1,2)});
        isocoeffs2=zeros(sizecoeffx,sizecoeffy,sizecoeffz);
    end
    for i=1:length(isocoeffind2)
        if isotype1==1
            isocoeffs2=isocoeffs2+coeffs{isocoeffind2(i,1),isocoeffind2(i,2)};
        elseif isotype2==1
            isocoeffs2=isocoeffs2+coeffs{isocoeffind2(i,1),isocoeffind2(i,2)}.^2;
        elseif isotype3==1
            isocoeffs2=isocoeffs2+abs(coeffs{isocoeffind2(i,1),isocoeffind2(i,2)});
        elseif isotype4==1
            isocoeffs2=isocoeffs2+coeffs{isocoeffind2(i,1),isocoeffind2(i,2)}.^2;
        end
        if isotype2==1
            isocoeffs2=sqrt(isocoeffs2);
        end
    end
else
    isocoeffs2=[];
end
if ~isempty(isocoeffind3)
    if datadim~=3
        [sizecoeffx,sizecoeffy]=size(coeffs{isocoeffind3(1,1),isocoeffind3(1,2)});
        isocoeffs3=zeros(sizecoeffx,sizecoeffy);
    else
        [sizecoeffx,sizecoeffy,sizecoeffz]=size(coeffs{isocoeffind3(1,1),isocoeffind3(1,2)});
        isocoeffs3=zeros(sizecoeffx,sizecoeffy,sizecoeffz);
    end
    for i=1:length(isocoeffind3)
        if isotype1==1
            isocoeffs3=isocoeffs3+coeffs{isocoeffind3(i,1),isocoeffind3(i,2)};
        elseif isotype2==1
            isocoeffs3=isocoeffs3+coeffs{isocoeffind3(i,1),isocoeffind3(i,2)}.^2;
        elseif isotype3==1
            isocoeffs3=isocoeffs3+abs(coeffs{isocoeffind3(i,1),isocoeffind3(i,2)});
        elseif isotype4==1
            isocoeffs3=isocoeffs3+coeffs{isocoeffind3(i,1),isocoeffind3(i,2)}.^2;
        end
        if isotype2==1
            isocoeffs3=sqrt(isocoeffs3);
        end
    end
else
    isocoeffs3=[];
end
end