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

📄 f_drawspec.m

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

%F_DRAWSPEC: Draw a block diagram for GUI module g_spectra
%
% Usage: f_drawspec (h,colors,fsize);
%
% Input: 
%        h      = axes handle
%        colors = array of plotting colors
%        fsize  = font size 

% Initialize

ylim = get(h,'Ylim');
xlim = get(h,'Xlim');
y0 = (ylim(2)-ylim(1))/2;
axes (h);
hold on
arrow = 0.1;
boxwidth = 0.2;
boxheight = 0.2;
circle = 0.02;

% Draw block diagram

f_circle (0.5-arrow-0.5*boxwidth,y0,circle,colors(1,:));
text (0.5-arrow-0.5*boxwidth-0.04,y0,'x(k)','Color',colors(1,:),'HorizontalAlignment','center',...
      'FontName','FixedWidthFontName','Fontsize',fsize);
f_vector (0.5-arrow-0.5*boxwidth+0.5*circle,y0,1,0,arrow-0.5*circle,colors(1,:))
f_block (0.5-0.5*boxwidth,y0-0.5*boxheight,boxwidth,boxheight,colors(2,:))
text (0.5,y0,'DFT','HorizontalAlignment','center','FontName','FixedWidthFontName','Fontsize',fsize)
f_line (0.5+0.5*boxwidth,y0,1,0,arrow-0.5*circle,colors(3,:))
f_circle (0.5+0.5*boxwidth+arrow,y0,circle,colors(3,:))
text (0.5+0.5*boxwidth+arrow+0.04,y0,'y(k)','Color',colors(3,:),'HorizontalAlignment','center',...
      'FontName','FixedWidthFontName','Fontsize',fsize);
 

⌨️ 快捷键说明

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