Multiples instances of a C-Mex function and shared memory

2 vues (au cours des 30 derniers jours)
Zangdaarr
Zangdaarr le 11 Août 2015
Modifié(e) : Zangdaarr le 11 Août 2015
Hi,
I have an C-Mex S-function that implements a Tutsin - Eulor PECE algorithm.
The function is worky perfectly fine, if only one block is present in the model. If I put several instances of the block, to filter several signals, then the outputs starts to be null.
I think that the difference instances of the function share the same memory, and this mess with my states vectors. I am not using the discrete state functions provided by MatLab, instead I use my own declared arrays of doubles (real_T ) which are not extern.
Any lead about this would be appreciated.
The code can be found here:
https://www.dropbox.com/s/d5nfdnio6qqrizq/te_pece.c?dl=0

Réponses (0)

Catégories

En savoir plus sur Modeling 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!

Translated by