www.gusucode.com > rf 工具箱matlab源码程序 > rf/+rfdata/@ip3/checkproperty.m

    function checkproperty(h)
%CHECKPROPERTY Check the properties of the object.
%   CHECKPROPERTY(H) checks the properties of the object.
%
%   See also RFDATA.IP3

%   Copyright 2003-2007 The MathWorks, Inc.

% Get the properties
freq = get(h, 'Freq');
data = get(h, 'Data');
n = numel(freq);
m = numel(data);
if ~((n ==0 && m == 1) || (n==m))
    error(message('rf:rfdata:ip3:checkproperty:WrongDataSize'));
end
if n ~= 0
    [freq, index] = sort(freq);
    data = data(index);
end
set(h, 'Freq', freq, 'Data', data);