function coeffvis(handles,CurrentResult,WT2val,datadim,coeffs,clabelsmatrix,isocoeffs,indiso)

axes(handles.mainframe2);
set(handles.radiobutton15,'Value',1);
cla;
colorbar('off');

if strfind(CurrentResult,'Isotropic')
    if (indiso(1)==0 && indiso(2)==0 && indiso(3)==1)
        isonum=3;
    elseif (indiso(1)==0 && indiso(2)==1 && indiso(3)==0)
        isonum=2;
    elseif (indiso(1)==1 && indiso(2)==0 && indiso(3)==0)
        isonum=1;
    elseif (indiso(1)==0 && indiso(2)==1 && indiso(3)==1)
        if strfind(CurrentResult,'lev. 2')
            isonum=1;
        elseif strfind(CurrentResult,'lev. 3')
            isonum=2;
        end
    elseif (indiso(1)==1 && indiso(2)==0 && indiso(3)==1)
        if strfind(CurrentResult,'lev. 1')
            isonum=1;
        elseif strfind(CurrentResult,'lev. 3')
            isonum=2;
        end
    elseif (indiso(1)==1 && indiso(2)==1 && indiso(3)==0)
        if strfind(CurrentResult,'lev. 1')
            isonum=1;
        elseif strfind(CurrentResult,'lev. 2')
            isonum=2;
        end
    elseif (indiso(1)==1 && indiso(2)==1 && indiso(3)==1)
        if strfind(CurrentResult,'lev. 1')
            isonum=1;
        elseif strfind(CurrentResult,'lev. 2')
            isonum=2;
        elseif strfind(CurrentResult,'lev. 3')
            isonum=3;
        end
    end
else
    [indx,indy]=find(ismember(clabelsmatrix,CurrentResult));
end
if datadim==1
    if strcmp(WT2val,'1D Continuous Wavelet Transform')
        if strfind(CurrentResult,'Isotropic')
            scalechk=size(isocoeffs{1});
        else
            scalechk=size(coeffs{1});
        end
        if scalechk(1)==1
            if strfind(CurrentResult,'Isotropic')
                plot(isocoeffs{isonum});
            else
                plot(coeffs{indx,indy});
            end
            xlimits=get(handles.mainframe2,'XLim');
            set(handles.edit10,'String',num2str(xlimits(1)));
            set(handles.edit11,'String',num2str(xlimits(2)));
            ylimits=get(handles.mainframe2,'YLim');
            set(handles.edit12,'String',num2str(ylimits(1)));
            set(handles.edit13,'String',num2str(ylimits(2)));
            set(handles.edit14,'String','NA');
            set(handles.edit15,'String','NA');
        else
            if strfind(CurrentResult,'Isotropic')
                imagesc(isocoeffs{isonum});
            else
                imagesc(coeffs{indx,indy});
            end
            axis xy;
            xlimits=get(handles.mainframe2,'XLim');
            set(handles.edit10,'String',num2str(xlimits(1)));
            set(handles.edit11,'String',num2str(xlimits(2)));
            ylimits=get(handles.mainframe2,'YLim');
            set(handles.edit12,'String',num2str(ylimits(1)));
            set(handles.edit13,'String',num2str(ylimits(2)));
            zlimits=get(handles.mainframe2,'ZLim');
            set(handles.edit14,'String',num2str(zlimits(1)));
            set(handles.edit15,'String',num2str(zlimits(2)));
            nbcol=256; bright=0;
            colormap(jet(nbcol));
            set(handles.slider1,'Value',nbcol); set(handles.slider2,'Value',bright);
            set(handles.edit8,'String',num2str(nbcol)); set(handles.edit9,'String',num2str(bright));
            c=colorbar('location','southoutside');
            cpos = get(c,'Position');
            cpos=[0.546376811594203 0.083762149799886 0.435748792270531 0.5*cpos(4)];
            set(c,'Position',cpos);
            set(handles.mainframe2,'Position',[564 90 450 450]);
        end
    else
        cla;
        if strfind(CurrentResult,'Isotropic')
            plot(isocoeffs{isonum});
        else
            plot(coeffs{indx,indy});
        end
        xlimits=get(handles.mainframe2,'XLim');
        set(handles.edit10,'String',num2str(xlimits(1)));
        set(handles.edit11,'String',num2str(xlimits(2)));
        ylimits=get(handles.mainframe2,'YLim');
        set(handles.edit12,'String',num2str(ylimits(1)));
        set(handles.edit13,'String',num2str(ylimits(2)));
        set(handles.edit14,'String','NA');
        set(handles.edit15,'String','NA');
    end
elseif datadim==2
    circchk=get(handles.edit4,'String');
    circdim=get(handles.edit3,'String');
    if strfind(circchk,'Circular')
        if strfind(CurrentResult,'Isotropic')
            csiz=size(isocoeffs{isonum});
        else
            csiz=size(coeffs{indx,indy});
        end
        if circdim(1:2)=='51'
            R=0.25;
        elseif circdim(1:2)=='64'
            R=0.5;
        end
        r=R/csiz(2):R/csiz(2):R;
        phi=0:2*pi/(csiz(1)-1):2*pi;
        [th,rq] = meshgrid(phi,r);
        if strfind(CurrentResult,'Isotropic')
            [X_1,Y_1,Z_1] = pol2cart(th,rq,isocoeffs{isonum}');
        else
            [X_1,Y_1,Z_1] = pol2cart(th,rq,coeffs{indx,indy}');
        end
        h = polar([0 2*pi], [0 R]);
        delete(h)
        hold on;
        surf(X_1,Y_1,Z_1);
        hold off;
        shading interp;
        set(findall(gca,'Type','patch'),'FaceColor','none');
    else
        if strfind(CurrentResult,'Isotropic')
            imagesc(isocoeffs{isonum});
        else
            imagesc(coeffs{indx,indy});
        end
    end
    axis xy;
    xlimits=get(handles.mainframe2,'XLim');
    set(handles.edit10,'String',num2str(xlimits(1)));
    set(handles.edit11,'String',num2str(xlimits(2)));
    ylimits=get(handles.mainframe2,'YLim');
    set(handles.edit12,'String',num2str(ylimits(1)));
    set(handles.edit13,'String',num2str(ylimits(2)));
    zlimits=get(handles.mainframe2,'ZLim');
    set(handles.edit14,'String',num2str(zlimits(1)));
    set(handles.edit15,'String',num2str(zlimits(2)));
    nbcol=256; bright=0;
    colormap(jet(nbcol));
    set(handles.slider1,'Value',nbcol); set(handles.slider2,'Value',bright);
    set(handles.edit8,'String',num2str(nbcol)); set(handles.edit9,'String',num2str(bright));
    c=colorbar('location','southoutside');
    cpos = get(c,'Position');
    cpos=[0.546376811594203 0.083762149799886 0.435748792270531 0.5*cpos(4)];
    set(c,'Position',cpos);
    set(handles.mainframe2,'Position',[564 90 450 450]);
elseif datadim==3
    if strfind(CurrentResult,'Isotropic')
        vol3d('CData',isocoeffs{isonum},'texture','3D');
    else
        vol3d('CData',coeffs{indx,indy},'texture','3D');
    end
    view(3);
    axis tight;
    xlimits=get(handles.mainframe2,'XLim');
    set(handles.edit10,'String',num2str(xlimits(1)));
    set(handles.edit11,'String',num2str(xlimits(2)));
    ylimits=get(handles.mainframe2,'YLim');
    set(handles.edit12,'String',num2str(ylimits(1)));
    set(handles.edit13,'String',num2str(ylimits(2)));
    zlimits=get(handles.mainframe2,'ZLim');
    set(handles.edit14,'String',num2str(zlimits(1)));
    set(handles.edit15,'String',num2str(zlimits(2)));
    nbcol=256; bright=0;
    colormap(jet(nbcol));
    set(handles.slider1,'Value',nbcol); set(handles.slider2,'Value',bright);
    set(handles.edit8,'String',num2str(nbcol)); set(handles.edit9,'String',num2str(bright));
    c=colorbar('location','southoutside');
    cpos = get(c,'Position');
    cpos=[0.546376811594203 0.083762149799886 0.435748792270531 0.5*cpos(4)];
    set(c,'Position',cpos);
    set(handles.mainframe2,'Position',[564 90 450 450]);
end