Using 'single' arrays with the "filter" command
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
We have to minimize our application's memory footprint and execution time, so I'm trying to move from "double" data arrays to "single" data arrays. The problem is that the "filter" command appears to return "double" filter states. Is there a way to use "single" data with the filter or even the "conv" command?
1 commentaire
Réponses (2)
Jonathan Sullivan
le 19 Nov 2012
Make sure all your inputs to filter are singles.
Here's an example for a simple moving average:
x = rand(100,1,'single');
a = ones(1,10,'single')/single(10);
b = single(1);
xf = filter(a,b,x);
class(x)
Voir également
Catégories
En savoir plus sur Filter Analysis dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!