Workspace data is not reflected in the model

조회 수: 1 (최근 30일)
sintu kumari
sintu kumari 2020년 1월 14일
편집: sintu kumari 2020년 1월 14일
We have used the 'From Workspace ' block in the model to pass the inputs from .mat file . Although the values of the signals from .mat file is properly reflected in the workspace , but it is not getting propogated in the model at correct time stamp.
We have not used the default setting of the 'From workspace' ,instead we have used the below shown settings.
InkedCapture_LI.jpg
However, When we are using the default settings , we observed the values of the signals from .mat file is properly reflected in the workspace , propogated in the model at correct time stamp.i.e
InkedCapture_1_LI.jpg
Also, as per our requirements we don't want to interpolate the data .
Could you please suggest the correct setting of the'From Workspace'

답변 (1개)

Raj
Raj 2020년 1월 14일
Ok to summarize, you have a time series data in your workspace which you want to import to Simulink at appropriate time stamps. Between one time stamp data to next, you want to hold the value and not interpolate.
I tried something simple like this and it seems to be working:
>> A=[0 0;1 1;2 2;3 3;4 4;5 5]
Saves 'A' in workspace as:
A =
0 0
1 1
2 2
3 3
4 4
5 5
where I assume my first column is time and second column is data.
Now a Simulink model with setting as shown will give you required output:
Capture.JPG
Capture1.JPG
Capture2.JPG
Hope this helps!!
  댓글 수: 1
sintu kumari
sintu kumari 2020년 1월 14일
편집: sintu kumari 2020년 1월 14일
Thanks for your responds . But this is not much helpful. Check the aatached files:

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by