Multiples instances of a C-Mex function and shared memory

3 Ansichten (letzte 30 Tage)
Milan
Milan am 11 Aug. 2015
Bearbeitet: Milan am 11 Aug. 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

Antworten (0)

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by