function syncprefs(this, Prefs)
% SYNCPREFS  nicholsview preferences

%  Author(s): Bora Eryilmaz
%  Copyright 1986-2004 The MathWorks, Inc.
%  $Revision: 1.1.6.3 $ $Date: 2004/12/26 21:53:22 $

cPrefs = get(this(1), 'UnwrapPhase');

% Set new preferences
if isfield(Prefs, 'UnwrapPhase') & ~strcmp(Prefs.UnwrapPhase,cPrefs)
  set(this, 'UnwrapPhase', Prefs.UnwrapPhase);
end

cPrefs = get(this(1), 'ComparePhase');

% Set new preferences
if isfield(Prefs, 'ComparePhase') && ...
        (~strcmp(Prefs.ComparePhase.Enable,cPrefs.Enable) || ...
        (Prefs.ComparePhase.Freq ~= cPrefs.Freq) || ...
        (Prefs.ComparePhase.Phase ~= cPrefs.Phase))
    set(this, 'ComparePhase', Prefs.ComparePhase);
end