% Compute field propagation matrix
%
% [sigDC, sigAC, mechTF, fDC, fAC] = compute(opt, pos, f)
% opt - Optickle model
% pos - optic positions (Nopt x 1, or empty for zeros)
% f - audio frequency vector (Naf x 1)
%
% sigDC - DC signals at this position for each probe (Nprb x 1)
% sigAC - transfer matrix for each probe (Nprb x Nopt x Naf)
%   sigAC is arranged such that sigAC(n, m, :) is the TF from
%   the position of optic m to probe n.
% mechTF - mechanical transfer functions (Nopt x Nopt x Naf)
%
% fDC - DC fields at this position (Nfld x Nrf)
% fAC - transfer matrix (Nrff x Nopt x Naf)
%   fAC is  arranged such that fAC(n, m, :) is the TF from the
%   position of optic m to DOF n.  The fields are upper and lower
%   audio SBs for each RF component, so Nrff = 2 * Nrf * Nfld.
% 
% see also computeFields, computeSignals, sweepDC
%
% Example:
% f = logspace(0, 3, 300);
% opt = optFP;
% [sigDC, sigAC] = compute(opt, [], f);

function [sigDC, sigAC, mechTF, fDC, fAC] = compute(opt, pos, f)

  [fDC, fAC, mechTF] = computeFields(opt, pos, f);
  [sigDC, sigAC] = computeSignals(opt, fDC, fAC);
