How to continuously repeat the output of the "From Spreadsheet" source block?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Dhananjay Kumar
am 2 Dez. 2019
Bearbeitet: Dhananjay Kumar
am 2 Dez. 2019
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 Kommentare
Siehe auch
Kategorien
Mehr zu Sources finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!