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

📄 dplot.m

📁 里面囊括了基于matlab滤波器设计的各种.m文件
💻 M
字号:
 
 
function dplot(x,y,hue)
%DPLOT        Plot discrete sequence data.
%        DPLOT(Y) plots the data sequence Y as stems from the x-axis.
%        DPLOT(X,Y) plots the data sequence Y at the values specfied
%        in X.
%        There is an optional final string argument to specify a color
%        for the stems of the data sequence.  E.g. STEM(X,Y,'r') or
%        STEM(Y,'g').
%
%        See also PLOT, BAR, STAIRS.
%
%      

n = length(x);
if nargin == 1
        y = x(:)';
        x = 1:n;
        hue = 'k';
elseif nargin == 2
        if isstr(y)
                hue = y;
                y = x(:)';
                x = 1:n;
        else
                x = x(:)';
                y = y(:)';
                hue = 'y';
        end
elseif nargin == 3
        x = x(:)';
        y = y(:)';
end
xx = [x;x;nan*ones(size(x))];
yy = [zeros(1,n);y;nan*ones(size(y))];
cax = newplot;
next = lower(get(cax,'NextPlot'));
hold_state = strcmp(next,'add') & 
strcmp('add',lower(get(gcf,'NextPlot')));
h = plot(xx(:),yy(:),hue);
v = axis;
v(2) = n+1;
axis(v);
%xlabel('Impulse Response');
xlabel('Time domain');

⌨️ 快捷键说明

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