Sky_98
Sky_98

Reputation: 1

How to create a Matlab/Simulink MEX file to save signal to the workspace

I'm new to C-Mex routines and seeking some direction.

How do I create a C-Mex file to save a simulink signal to the Matlab workspace. The function is to be the same as the Simulink block 'To Workspace'.

Upvotes: 0

Views: 267

Answers (1)

Daniel
Daniel

Reputation: 36710

Use mexPutVariable to write into the base workspace, but unless you have very good reasons use the predefined block.

Upvotes: 2

Related Questions