Read data from spreadsheet in Simulink

1 回表示 (過去 30 日間)
Xu Cheng
Xu Cheng 2018 年 11 月 27 日
回答済み: Arunkumar M 2018 年 11 月 28 日
First of all, I cannot copy and paste my message to this field and I have to re-type what I have already done some where else. What a pain!
The Matlab/Simulink document states "The From Spreadsheet block interprets the first column as time. ...."
Say my spreadsheet file has its first column as time stamp. The entire time range is 10 hour, and the time step is 1 hour apart (i.e., I have 10 rows of data in total). So the two questions are:
(1) In the Simulink "simulation time" entry field near the top toolbar, what number do I have to enter? what if I enter a smaller number than 10 hour? In this case will the simulation still run 10 hours regardless what simulation time I put in?
(2) How many points will Matlab/Simulink interpret between two adjacent time stamps (currently 1 hour apart) ?

採用された回答

Arunkumar M
Arunkumar M 2018 年 11 月 28 日
(1) Simulation time entry field is in seconds. If you set simulation time less than 10hours(36000s) say 5000s then simulation stops at 5000s. Only the data till 5000s would have been used by the simulaton.
(2) By default, matlab interpolates data inbetween. Time step is defined by the solver. If you use fixed step solver, then you have the option to define your time step in Model Configuration.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by