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

5 次查看(过去 30 天)
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