How to continuously repeat the output of the "From Spreadsheet" source block?
4 ビュー (過去 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!