필터 지우기
필터 지우기

getting data from workspace to Simulink

조회 수: 2 (최근 30일)
guo qing
guo qing 2024년 2월 25일
댓글: Walter Roberson 2024년 2월 25일
I want to input an array x=[1 2 3 4 5 6] from the workspace into Simulink using the From Workspace block. However, the block only displays five dimensions, and I understand that one of the dimensions is reserved for the time sequence. Do I need to define the time vector for this block, or can I input the data without defining a specific time sequence? Thank you very much

채택된 답변

Walter Roberson
Walter Roberson 2024년 2월 25일
If you insist on using a From Workspace block, then you need to insert a leading 0 into the vector to act as the time coordinate.
  댓글 수: 2
guo qing
guo qing 2024년 2월 25일
Thank you
Walter Roberson
Walter Roberson 2024년 2월 25일
You should consider instead the possibility of using a Constant block https://www.mathworks.com/help/simulink/slref/constant.html and specifying the name of the variable (in the base workspace) as the value of the Constant Value parameter.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by