Effacer les filtres
Effacer les filtres

How to get dsp.CICDecimator section word lengths?

3 vues (au cours des 30 derniers jours)
Jonathan Drolet
Jonathan Drolet le 17 Oct 2016
mfilt.cicdecim is now deprecated in favor of dsp.CICDecimator. However, I can't find how to get dsp.CICDecimator to give me the word length of every sections of the CIC. For example:
hd = mfilt.cicdecim(20, 1, 2, 16, 16, 15);
wordLengths = hd.SectionWordLengths; % [24 20 19 18]
fracLengths = hd.SectionFracLengths; % [14 10 9 8]
outputFracLength = hd.OutputFracLength; % 6
How would I get the same results using dsp.CICDecimator? I can do
hd = dsp.CICDecimator(20, 1, 2, 'OutputWordLength', 16);
but I can't figure out how to get minimum word/frac length for each section. I can't even seem to be able to give the input word/frac length!
  1 commentaire
Meng Zhao
Meng Zhao le 16 Août 2017
I have run into this problem, too. Any answers?

Connectez-vous pour commenter.

Réponses (1)

Edson Silva
Edson Silva le 24 Juil 2020
The following code will do the job:
CIC1 = dsp.CICDecimator(8,1,3);
CIC1.SectionWordLengths=[32 32 32 32];
CIC1.FixedPointDataType='Specify word lengths'
letting the last line without the comma will show you the following:
CIC1 =
dsp.CICDecimator with properties:
DecimationFactor: 8
DifferentialDelay: 1
NumSections: 3
FixedPointDataType: 'Specify word lengths'
SectionWordLengths: [32 32 32 32]
OutputWordLength: 32

Catégories

En savoir plus sur Language Fundamentals dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by