Using multiple MATLAB level 2 S-functions in one Simulink model?

5 views (last 30 days)
I have a model where I have simulated the response of drone using an S-function. I am trying create a simulation where I have multiple drones simulated in one Simulink model, but the response is not as expected; somehow if I put two or more S-functions in, all of them behave unexpectedly. Uncommenting all but one S-function will produce the right response for the specific S-function.
I am using MATLAB Level 2 S-functions. I am wondering if the S-functions are sharing variables, or if anyone else has experienced something similar when using S-functions.
Reading some documentation, I was under the impression that this is not a complex task, so I am wondering where specifically I should look for what could be causing this issue. Is using multiple functions something that needs to be declared explicitly in the s-function?

Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!