How can I specify CoefficientsDataType for dsp.CICCompensationDecimator?
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
How can I specify 'CoefficientsDataType' for dsp.CICCompensationDecimator?
It does't seem to work. Could you please show me a working example?
This is the Error that I see:
>> pol_coeff_data_type = numerictype('Signed',true,'WordLength',16,'FractionLength',16);   % TWC 0.16
polfilt = dsp.CICCompensationDecimator(cicfilt, ...
				     'DecimationFactor'     , pol_r, ...
				     'DesignForMinimumOrder', false,...    %default='true'
				     'FilterOrder'	    , pol_length-1,...
				     'PassbandFrequency'    , fPass, ...
				     'StopbandAttenuation'  , 80, ...
				     'CoefficientsDataType' , pol_coeff_data_type, ...
				     'SampleRate'	    , cic_out_fs);
Error using fromOpaque (line 14)
Conversion to char from embedded.numerictype is not possible.
Error in opaque/strcmp (line 6)
s = strcmp(fromOpaque(s1),fromOpaque(s2));
Error in dsp.CICCompensationDecimator>@(x)strcmp('CICRateChangeFactor',x) (line 177)
                    if nnz(cellfun(@(x) strcmp('CICRateChangeFactor',x), varargin) >0)
Error in dsp.CICCompensationDecimator (line 177)
                    if nnz(cellfun(@(x) strcmp('CICRateChangeFactor',x), varargin) >0)
0 Commenti
Risposte (1)
  Shiva Kalyan Diwakaruni
    
 il 5 Mag 2021
        Hi,
This is currently a bug in parsing the name value pairs. A workaround is to specify the CoefficientsDataType after the creation of the filter
CICDecim = dsp.CICDecimator('DecimationFactor',6, 'NumSections',6);
pol_coeff_data_type = numerictype('Signed',true,'WordLength',16,'FractionLength',16);
CICCompDecim = dsp.CICCompensationDecimator(cicfilt, ...
				     'DecimationFactor'     , pol_r, ...
				     'DesignForMinimumOrder', false,...    %default='true'
				     'FilterOrder'	    , pol_length-1,...
				     'PassbandFrequency'    , fPass, ...
				     'StopbandAttenuation'  , 80, ...
				     'CoefficientsDataType' , pol_coeff_data_type, ...
				     'SampleRate'	    , cic_out_fs)
CICCompDecim.CoefficientsDataType = pol_coeff_data_type;
Hope it helps.
0 Commenti
Vedere anche
Categorie
				Scopri di più su Filter Design in Help Center e File Exchange
			
	Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

