function spectral_shaping_animation(...
    fcz,            ...
    lcz,            ...
    mode,           ...
    nb_aic_max,     ...
    nb_fir_max,     ...
    second_plot_en, ...
    webdemo_en,     ...
    filename,       ...
    yscale          ...
  )
  
  for i = 1:nb_fir_max
    new_filename = [filename '_' num2str(i-1)];
    if strcmpi(mode, 'aic')
      if i < nb_aic_max
        n = i;
      else
        n = nb_aic_max;
      end
      heading = '%i AIC subcarriers';
    else
      switch lower(mode)
        case 'firpm'
          name = 'equiripple';
        case 'firls'
          name = 'least square';
        case 'firrc'
          name = 'raised cosine';
      end
      n = 10*i+1;
      heading = [name ' FIR filter with N=%i taps'];
    end
    spectral_shaping(...
      4,                    ...% size of QAM/PAM alphabet
      'qam',                ...% mode of QAM/PAM: 'bpsk', 'qpsk', 'qam', 'pam'
      64,                   ...% number of subcarriers for OFDM
      500,                  ...% number of OFDM-symbols to be generated
      fcz,                  ...% first subcarrier to cancel
      lcz,                  ...% last subcarrier to cancel
      6,                    ...% number of edge subcarriers to disable
      16,                   ...% factor of oversampling for aic-calculation
      2^5,                  ...% factor of oversampling used for finer plot of spectrum
      mode,                 ...% mode of the cancellation: 'none', 'dt'/'disabletones', 'aiconly', 'aic', 'fir'
      n,                    ...% number of subcarriers used for cancellation signal
      [0 0 n 1 0],          ...% parameters for FIR filter design [passband_db stopband_db nb_taps transition_width neg_en]
      0,                    ...% IQ imbalance, set to 0 to disable, otherwise pass a vector [phi_imb a_imb dc_imb], a_imb and dc_imb are optional
      [1 second_plot_en],   ...% enable plotting [primary_plot secondary_plot filtercmp_pm fircmp_ls fircmp_rc]
      1,                    ...% if 1, then plot in dB
      webdemo_en,           ...% if 0, then test-mode in Octave/Matlab commandline, no webserver running
      new_filename,         ...% output file for webdemo
      'png',                ...% filetype
      yscale,               ...% optional ymin and ymax
      [-32 32],             ...% default x range
      sprintf(heading, n)   ...% heading
    );
  end
end