Model reference block shared in simulation and autocode files: How can I save signal data to file without using "to file" blocks?

2 vues (au cours des 30 derniers jours)
I recently copied a large portion of a simulation into another file that I configured for code generation. I'd like to turn the shared code into a model reference block, so that when I make edits in the autocode file, the simulation will automatically update (or vice versa). However, (obviously) the "To File" blocks in my simulation version of the code don't work in the autocode version. I've considered removing the "To File" blocks and using signal logging instead (which I believe can be shared between the simulation and autocode file). However, I'm finding that the logsout file is rather clumsy to work with outside of the Simulation Data Inspector GUI.
Does anyone have suggestions for how I can share code between an autocode file and a simulation file, and still be able to export signal data to a *.mat file for the simulation only? Thanks!
I'm using Matlab 2012b.

Réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by