⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plotmanifold.m

📁 流形学习程序
💻 M
字号:
function PlotManifold (hObject, eventdata, handles, plotNumber)
% --- Plot the input manifold.

[m,n] = size(handles.X);
if get(handles.ColorCheck,'Value') == 1 & handles.isExample == 0
    handles.ColorVector = evalin ('base',get(handles.ColorEdit,'String'));
    Clength = length(handles.ColorVector);
    if Clength < m
        handles.ColorVector(Clength+1:m) = handles.ColorVector(Clength);
    elseif Clength > m
        handles.ColorVector = handles.ColorVector(1:m);
    end;
end;
guidata(hObject, handles);
if plotNumber == 0
    axes(handles.maniAXES);
else
    figure;
    subplot(331);
end;
if n == 2
    if get(handles.ColorCheck,'Value') == 1 | handles.isExample == 1
        scatter(handles.X(:,1),handles.X(:,2),12,handles.ColorVector,'filled');
    else
        scatter(handles.X(:,1),handles.X(:,2),12,'filled');
    end;
    axis tight;
elseif n == 3
    if get(handles.ColorCheck,'Value') == 1 | handles.isExample == 1
        scatter3(handles.X(:,1),handles.X(:,2),handles.X(:,3),12,handles.ColorVector,'filled');
    else
        scatter3(handles.X(:,1),handles.X(:,2),handles.X(:,3),12,'filled');
    end;
    axis tight;
elseif n == 1
    if get(handles.ColorCheck,'Value') == 1 | handles.isExample == 1
        scatter(handles.X(:,1),ones(m,1),12,handles.ColorVector,'filled');
    else
        scatter(handles.X(:,1),ones(m,1),12,'filled');
    end;
    axis tight;
else
    cla;
    axis([-1 1 -1 1]);
    text(-0.7,0,'Only plots 2D or 3D data');
    axis off;
end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -