Multiples instances of a C-Mex function and shared memory
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!