smoothsliderredraw.m

来自「Interactive smoothing for time-series si」· M 代码 · 共 16 行

M
16
字号
% Redraws graph for SmoothSlider when the sliders are changed
  axes(h);
  PlotRange=[SmoothWidth.*1:length(X)-SmoothWidth.*1];
  temp=Y;
  for k=1:Passes,
      % You can use any smooth function here in place of fastsmooth,
      temp=fastsmooth(temp, SmoothWidth);
  end
  SmoothY=temp;
  plot(X(PlotRange),SmoothY(PlotRange))
  figure(1);
  title(['Smooth Width = ' num2str(SmoothWidth) '   Number of passes = ' num2str(Passes) '    Signal maximum = ' num2str(max(SmoothY)) ])
  xlabel('The smoothed signal is in the vector SmoothY')
  h2=gca;
  axis([X(1) X(length(X)) min(Y) max(Y)]);
  grid on

⌨️ 快捷键说明

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