input and outpt in simulink
显示 更早的评论
hi how to give input from textfile to simulink(power system) voltage source and how to store output (from voltage mesurement)vlaue dirtecly to DB or File. thanx
回答(1 个)
Andreas Goser
2012-3-8
2 个投票
I assume you mean signals, not parameters.
Input: Either From File or From Workspace block. This depends on the structure of the text file. I suggest that you try to import the file into MATLAB first and then use "from workspace"
Output: Pretty similar: To Workspace or To File are two options
In general, you may wnat to investigate model callbacks, e.g. such a call back that executes after the model is completed. Here you e.g. could write MATLAB code that sends results from the workspace to a database.
3 个评论
K E
2012-3-8
Here is some info on model callbacks, which are new to me, http://www.mathworks.com/help/toolbox/simulink/ug/f4-122589.html . Are there any advantages (in execution speed, readability, etc) of using model callback instead of simply writing a Matlab script to run the simulation, take its output, and save it to a file?
Andreas Goser
2012-3-8
One advantage I can think of is that it all stays in a single file.
K E
2012-3-8
Thanks!
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!