how to use a data from matlab as a input in simulink

Hi, I am new in matlab and simulink. I calculated a motion with time in matlab and then I would like to use it as a input data in simulink. Anyone can teach me how to do this please. Please tell more details as I am really really new user. Thanks.

댓글 수: 1

Vivi
Vivi 2013년 7월 16일
what to write in Matlab, use which block,and what to set in Simulink to allow the Simulink to read this data.

답변 (1개)

Andreas Goser
Andreas Goser 2013년 7월 16일

0 개 추천

There is a "From Workspace" block in the sources library. That's all you need. And there is a documentation.

댓글 수: 6

Vivi
Vivi 2013년 7월 16일
I follow the documentation, but when I run the simulink error shown up. Should I have to write something in Matlab to allow the simulink to read the data?
It would help to post the error. Try simple test data first so that you understand the block. Feel free to post more details here.
Vivi
Vivi 2013년 7월 16일
Error: undefined function or variable 'data' ( data is the name of the motion called in M and S).
Vivi
Vivi 2013년 7월 16일
Should I use the From File block?
What does "which data -all" return?
I am under the impression that "data" is a variable in the workspace, If it is in a file, indeed (if in the right format), then indeed From File block

이 질문은 마감되었습니다.

태그

질문:

2013년 7월 16일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by