Main Content

releaseBranches

Call release on all branches in parallel filter

Since R2023b

Description

releaseBranches(PF) calls the release function on all branches of the parallel filter PF, which releases the locked state of all branches that are locked..

For instance, if the dsp.ParallelFilter object contains a dsp.FIRFilter object and a dsp.FIRInterpolator object, the releaseBranches function calls release on both the dsp.FIRFilter object and the dsp.FIRInterpolator object.

example

Examples

collapse all

Using the releaseBranches function, you can release the branches of a parallel filter.

Construct a dsp.ParallelFilter object with dsp.FIRFilter and dsp.IIRFilter as branches. Passing data through the FIR filter object locks the FIR filter object branch.

firFilt = dsp.FIRFilter;
firFilt(randn);
pf = dsp.ParallelFilter(dsp.IIRFilter,firFilt)
pf = 
  dsp.ParallelFilter with properties:

          Branch1: [1x1 dsp.IIRFilter]
          Branch2: [1x1 dsp.FIRFilter]
    CloneBranches: true

isLocked(pf.Branch2)
ans = logical
   1

Release the branches of the filter and check if the FIR filter branch is locked.

releaseBranches(pf)
isLocked(pf.Branch2)
ans = logical
   0

If you set the CloneBranches property to false while constructing the dsp.ParallelFilter object, and you pass data through one of the branches, the same branch that you store in the parallel filter object also gets locked.

firFilt = dsp.FIRFilter;
iirFilt = dsp.IIRFilter;
pf_clone = dsp.ParallelFilter(iirFilt,firFilt,CloneBranches=false)
pf_clone = 
  dsp.ParallelFilter with properties:

          Branch1: [1x1 dsp.IIRFilter]
          Branch2: [1x1 dsp.FIRFilter]
    CloneBranches: false

y = firFilt(randn(13,3));
isLocked(pf_clone.Branch2)
ans = logical
   1

Release the branches of the parallel filter using the releaseBranches function.

releaseBranches(pf_clone)

Check if the FIR filter branch is locked.

isLocked(pf_clone.Branch2)
ans = logical
   0

Input Arguments

collapse all

Parallel filter, specified as a dsp.ParallelFilter System object.

Version History

Introduced in R2023b