Effacer les filtres
Effacer les filtres

matlab filter: max variable size allowed by function, error

3 vues (au cours des 30 derniers jours)
GG
GG le 6 Août 2015
Commenté : GG le 6 Août 2015
The following code,
Hm = mfilt.firinterp(interp, hh);
Hm.Numerator = interp*Hm.Numerator;
set(Hm,'arithmetic','single');
out = filter(Hm, data);
where interp=4 (integer), hh is 1x97 double, and data is 1x1048994399 single.
results in the following error:
Error using sfirinterpfilter
Maximum variable size allowed by the function is exceeded.
Error in dfilt.singlefilterquantizer/firinterpfilter (line 11)
[y,z,tapidx] = sfirinterpfilter(p,L,x,uint32(ny),z,tapidx);
Error in mfilt.firinterp/secfilter (line 20)
[y,z,tapidx] = firinterpfilter(Hm.filterquantizer, ...
Error in dfilt.abstractfilter/super_filter (line 61)
[y,zf] = secfilter(Hd,[xi;x(1:end-rs,:)],zi);
Error in dfilt.abstractfilter/filter (line 12)
y = super_filter(varargin{:});
Error in r_sc1 (line 612)
out = filter(Hm, data);
Anyone know the limit for filter in this case? And/or how to workaround this error (e.g. is it possible to split the filtering into two operations, etc.)?

Réponses (1)

Walter Roberson
Walter Roberson le 6 Août 2015
With regards to breaking it up into runs: see http://www.mathworks.com/help/dsp/ref/mfilt.firinterp.html PersistentMemory and States .
You have a Finite Impulse Response filter so it is only necessary for the filter to remember length(hh) values to be able to stop filtering and pick up again later at the next sample.
  1 commentaire
GG
GG le 6 Août 2015
Thanks for the hint Walter. It seems the PersistentMemory setting enables the States functionality. I found the following link that provides an example: http://www.mathworks.com/help/dsp/ref/filter.html

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with DSP System Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by