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

📄 f_guihome.m

📁 DSP程序 Matlab是一套用于科学工程计算的可视化高性能语言与软件环境。它集数值分析、矩阵运算、信号处理和图形显示于一体
💻 M
字号:
function [hfig,han,pos,colors,ht,fsize] = f_guihome

%F_GUIHOME: Create figure window for the homework builder module
%
% Usage:   [hfig,han,pos,colors,fsize] = f_guihome
%
% Outputs:
%          hfig   = hand to figure window
%          han    = array of handles to tiled axes
%          pos    = array of position vectors for tiled axes
%          colors = array of plot colors
%          ht     = array of handles to text objects
%          fsize  = font size

[fsize,horz,vert] = f_screen(1);
margin = 0.06;
hfig = figure('NumberTitle','off',...
              'Name','Homework Builder Module => g_homework',...
              'MenuBar',menubar,...
              'Units','normalized',...
              'Position',[margin,margin,1-2*margin,1-2*margin],...
              'PaperPosition',[.5,1,7.5,9]);

[q,matlab_version] = f_oldmat;
if matlab_version >= 7.0
    set (hfig,'DockControl','off')
end

% Compute dimensions of tiled axes 

screen = get(0,'Screensize');
dx = 0.03;
dy = 0.02*screen(3)/screen(4);
x1 = 0.4 - 1.5*dx;
x2 = x1;
x3 = 0.6 - 1.5*dx;
y1 = 0.42;
y2 = 0.42;
y3 = 0.9;
pos = [dx,dy+y2+(y3-y1-y2),x1,y1
       dx,dy,x2,y2
       0.4+dx/2,dy,x3,y3];
n = size(pos,1);   
white = [1 1 1];

% Create tiled axes

for i = 1 : n
    han(i) = axes('Position',pos(i,:));
    axis ([0 1 0 1])
    if (i <= 2) 
        colors = get(gca,'ColorOrder');
    end        
    set (han(i),'Xtick',[])
    set (han(i),'Ytick',[])
    set (han(i),'Color',white)
    switch (i)
        case 1, ht(1) = text (0.5,1.04,'Create homework assignment','HorizontalAlignment','center',...
                              'Color',colors(1,:),'FontName','FixedWidthFontName','FontSize',fsize);
        case 2, ht(2) = text (0.5,1.04,'Select homework problems','HorizontalAlignment','center',...
                              'Color',colors(2,:),'FontName','FixedWidthFontName','FontSize',fsize);
    end
    box on
end

⌨️ 快捷键说明

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