simulinke with m-file

can i make interface between a simulink file and m- file ? simulink the op signal is sin and i need m-file to calculate frequency of signal?

 采纳的回答

K E
K E 2012-3-14
You can run Simulink from the matlab prompt or from within a script using the sim command, and pass the simulation output back to the workspace. For example,
simOut = sim('myModel') ;
See this tutorial and 'Communication between the Matlab’s Command window/workspace and Simulink’s Model window' in this tutorial. In Matlab, you can then calculate the frequency of the output signal.

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Modeling 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by