% Sweep a single optic
% [md, mp] = sweepOptic(opt, p, dSpec, nOpt, x)

function [md, mp] = sweepOptic(opt, p, dSpec, nOpt, x)

  z = zeros(length(x), opt.Nopt);
  for n = nOpt
    z(:, n) = x;
  end

  [md, mp] = dcDemod(opt, p.nIn, p.fMod, p.gMod, p.order, dSpec, z);
