cost
Estimate implementation cost of audio System objects
Description
returns a structure, implementationCost
= cost(audioObj
)implementationCost
, whose fields contain
information about the computation cost of implementing the audio System object™, audioObj
.
Examples
Estimate Implementation Cost of Crossover Filter
Create a crossover filter with 2 crossovers with 48 dB/octave slopes. Call cost
to get an estimate of the implementation cost.
crossFilt = crossoverFilter('NumCrossovers',2,'CrossoverSlopes',48); cost1 = cost(crossFilt)
cost1 = struct with fields:
NumCoefficients: 120
NumStates: 48
MultiplicationsPerInputSample: 120
AdditionsPerInputSample: 97
Reduce the crossover slopes for both crossovers to 12 dB/octave. Call cost
to get an estimate of the new implementation cost.
crossFilt.CrossoverSlopes = 12; cost2 = cost(crossFilt)
cost2 = struct with fields:
NumCoefficients: 36
NumStates: 12
MultiplicationsPerInputSample: 36
AdditionsPerInputSample: 25
Input Arguments
audioObj
— Audio System object
crossoverFilter
object
Specify the input as a supported audio System object.
Data Types: object
Output Arguments
implementationCost
— Estimate of implementation cost
struct
Estimate of the implementation cost of a filter, returned as struct:
Structure Field | Description |
---|---|
| Number of filter coefficients (excluding coefficients with values 0, 1 or -1) |
| Number of states |
| Number of multiplication per input sample |
| Number of additions per input sample |
Version History
Introduced in R2016a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)