필터 지우기
필터 지우기

How to continuously repeat the output of the "From Spreadsheet" source block?

조회 수: 5 (최근 30일)
Torsten Knodt
Torsten Knodt 2019년 11월 30일
편집: Dhananjay Kumar 2019년 12월 2일
Hi,
How can I continuously repeat the output of the "From Spreadsheet" source block?
The extrapolation at the end does not provide this option.
Thanks in Advance,
Torsten Knodt

답변 (1개)

Dhananjay Kumar
Dhananjay Kumar 2019년 12월 2일
편집: Dhananjay Kumar 2019년 12월 2일
For this you need to first set the Treat first column parameter in the From Spreadsheet block as Data and then set the Output after last data point parameter as Repeating sequence.
This configuration treats all the columns in the excel file as signals (including the first column).
All the columns are treated as sequence of numbers and shown as signals (with the time spacing between the numbers equal to Sample time parameter value).
Suppose excell file has the follwing data:
In1 In2
0.1 0.2
0.2 0.9
2.4 2.5
0.3 0.9
Then, with the configuration set as above and sample time set as 0.5, simulink will interpret In1 signal as follows:
Time In1
0 0.1
0.5 0.2
1.0 2.4
1.5 0.3
2.0 0.1 (starts repeating)
2.5 0.2
3.0 2.4
...... and will keep repeating. Will run till final time equal to Simulation stop time.
Similarly for In2
Time In2
0 0.2
0.5 0.9
1.0 2.5
1.5 0.9
2.0 0.2 (starts repeating)
.....(keeps repeating)

카테고리

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

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by