MATLAB Answers

Can generated code step() function returns the derivatives?

1 view (last 30 days)
Linh Phan
Linh Phan on 19 Sep 2019
Edited: Walter Roberson on 20 Sep 2019
Dear support,
I am using:
MATLAB Version: (R2019a)
MATLAB License Number: 1XXXXXX
Operating System: Linux 4.18.0-25-generic #26-Ubuntu SMP Mon Jun 24 09:32:08 UTC 2019 x86_64
Java Version: Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
I was wondering when generating C code from a Simulink subsystem, is there a way to get the "void Subsystem_step(void)" to just return the xdot (derivatives) given the x (states). Since I will be incorporating the Simulink "Subsystem_step()" function into my bigger external simulation which also have continuous states, I need to do the integration of the Simulink generated code continuous states externally from the Simulink's "Subsystem_step()" ("Subsystem_step()" by default will internally integrate its states). Is this possible?


Sign in to comment.

Answers (0)





Community Treasure Hunt

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

Start Hunting!