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

📄 draw_portrait.m

📁 主成分分析和偏最小二乘SquaresPrincipal成分分析( PCA )和偏最小二乘( PLS )
💻 M
字号:
function draw_portrait;
%Function draws phase portrait

% last modified 29.02.04

global TS GSD_GLOBALS

[h, fig] = gcbo;
L=length(GSD_GLOBALS.view_phase_portrait.ListBox);
val=get(h,'value');
if val>1
    if h==GSD_GLOBALS.view_phase_portrait.ListBox(1)
        set(fig,'currentaxes',GSD_GLOBALS.view_phase_portrait.ax(1));
        set(GSD_GLOBALS.view_phase_portrait.ax(1),'visible','on');
    elseif h==GSD_GLOBALS.view_phase_portrait.ListBox(2)
        set(fig,'currentaxes',GSD_GLOBALS.view_phase_portrait.ax(2));
        set(GSD_GLOBALS.view_phase_portrait.ax(2),'visible','on');
    else
        set(fig,'currentaxes',GSD_GLOBALS.view_phase_portrait.ax(3));
        set(GSD_GLOBALS.view_phase_portrait.ax(3),'visible','on');
    end
    plot(TS.time,TS.data(:,val-1));
else
    if h==GSD_GLOBALS.view_phase_portrait.ListBox(1)
        set(fig,'currentaxes',GSD_GLOBALS.view_phase_portrait.ax(1));
        set(GSD_GLOBALS.view_phase_portrait.ax(1),'visible','off');
    elseif h==GSD_GLOBALS.view_phase_portrait.ListBox(2)
        set(fig,'currentaxes',GSD_GLOBALS.view_phase_portrait.ax(2));
        set(GSD_GLOBALS.view_phase_portrait.ax(2),'visible','off');
    else
        set(fig,'currentaxes',GSD_GLOBALS.view_phase_portrait.ax(3));
        set(GSD_GLOBALS.view_phase_portrait.ax(3),'visible','off');
    end
    cla
end

selection=[];
for i=1:L
    val=get(GSD_GLOBALS.view_phase_portrait.ListBox(i),'value');
    if val>1
        selection=[selection val];
    end
end

set(fig,'currentaxes',GSD_GLOBALS.view_phase_portrait.ax(4));

switch length(selection)
    case {0,1}
        set(GSD_GLOBALS.view_phase_portrait.ax(4),'visible','off');
        cla;
        set(GSD_GLOBALS.view_phase_portrait.PPText,'visible','off');
    case 2
        set(GSD_GLOBALS.view_phase_portrait.PPText,'visible','on');
        set(GSD_GLOBALS.view_phase_portrait.ax(4),'visible','on');
        cla;
        plot(TS.data(:,selection(1)-1),TS.data(:,selection(2)-1)),grid on;
        set(xlabel(TS.name{selection(1)-1}),'interpreter','none');
        set(ylabel(TS.name{selection(2)-1}),'interpreter','none');
    case 3
        set(GSD_GLOBALS.view_phase_portrait.PPText,'visible','on');
        set(GSD_GLOBALS.view_phase_portrait.ax(4),'visible','on');
        cla;
        plot3(TS.data(:,selection(1)-1),TS.data(:,selection(2)-1),TS.data(:,selection(3)-1));
        grid on;
        set(xlabel(TS.name{selection(1)-1}),'interpreter','none');
        set(ylabel(TS.name{selection(2)-1}),'interpreter','none');
        set(zlabel(TS.name{selection(3)-1}),'interpreter','none');
end

⌨️ 快捷键说明

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