How can I make an object declared within a function persistent?
Mostra commenti meno recenti
I have defined two handle classes for audio filters (LPcomb and APfilt). I would like to write a function to apply these filters to streaming audio on a block-by-block basis. So I declare the object variables to be persistent. In the "if isempty - end" block I try to instantiate these variables as objects of my classes. I get the following error message:
The following error occurred
converting from LPcomb to double:
Error using double
Conversion to double from LPcomb
is not possible.
So it seems that when you declare a variable to be persistent, it is declared as a double and cannot be instantiated as an object. How can I declare persistent objects in a function?
1 Commento
Guillaume
il 16 Giu 2015
I cannot reproduce the problem. Can you post the code that is creating the error?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Direction of Arrival Estimation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!