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
0 个评论
回答(1 个)
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)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!