function showPs(deltapsCenter, p, variances)
% Created by Yuandong Tian, Oct. 5, 2009
% Email: yuandong@andrew.cmu.edu
% show the coefficients over time

[firstNC, nFrame] = size(deltapsCenter);

if ~exist('variances', 'var')
    variances = ones(firstNC, 1);
end;

for i = 1:firstNC
    subplot(2, firstNC/2, i);
    plot(1:nFrame, deltapsCenter(i, :) / sqrt(variances(i)), 'r--', 'LineWidth', 4);
    hold on;
    plot(1:nFrame, p(i, :) / sqrt(variances(i)), 'b-', 'LineWidth', 4);
    hold off;
    axis tight;
    xlabel('frames');
    title(['Coefficient #' num2str(i)]);
end;