주요 콘텐츠

cost

오디오 System object의 구현 비용 추정

설명

implementationCost = cost(audioObj)는 구조체 implementationCost를 반환합니다. 이 구조체의 필드에는 오디오 System object™ audioObj를 구현하는 데 드는 계산 비용에 대한 정보가 포함되어 있습니다.

예제

예제

모두 축소

기울기가 48dB/octave인 교차가 2개 있는 교차 필터를 만듭니다. cost를 호출하여 구현 비용의 추정값을 구합니다.

crossFilt = crossoverFilter('NumCrossovers',2,'CrossoverSlopes',48);
cost1 = cost(crossFilt)
cost1 = struct with fields:
                  NumCoefficients: 120
                        NumStates: 48
    MultiplicationsPerInputSample: 120
          AdditionsPerInputSample: 97

두 교차의 교차 기울기를 12dB/octave로 줄입니다. cost를 호출하여 새 구현 비용의 추정값을 구합니다.

crossFilt.CrossoverSlopes = 12;
cost2 = cost(crossFilt)
cost2 = struct with fields:
                  NumCoefficients: 36
                        NumStates: 12
    MultiplicationsPerInputSample: 36
          AdditionsPerInputSample: 25

입력 인수

모두 축소

입력을 지원되는 오디오 System object로 지정합니다.

데이터형: object

출력 인수

모두 축소

필터 구현 비용의 추정값으로, 구조체로 반환됩니다.

구조체 필드

설명

NumCoefficients

필터 계수의 개수(값이 0, 1 또는 -1인 계수 제외)

NumStates

상태 개수

MultiplicationsPerInputSample

입력 샘플당 곱셈 수

AdditionsPerInputSample

입력 샘플당 덧셈 수

버전 내역

R2016a에 개발됨

참고 항목