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
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
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
Andreas Goser 2012년 3월 8일
One advantage I can think of is that it all stays in a single file.
K E
K E 2012년 3월 8일
Thanks!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

질문:

2012년 3월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by