%% Release a Sample Rate Converter
% Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent  step syntax. For example, myObject(x) becomes step(myObject,x).
% Create a multistage sample rate converter with default properties, corresponding to the combined three filter stages used to convert from 192 kHz to 44.1 kHz. Call the converter on random data. Verify that the converter is locked.

src = dsp.SampleRateConverter;

[L,M] = getRateChangeFactors(src);
y = src(randn(M,2));
yes = isLocked(src)

%
% Use release to release src. Verify that it is unlocked.

release(src)

no = isLocked(src)

% Copyright 2012 The MathWorks, Inc.