Read data from spreadsheet in Simulink
2 次查看(过去 30 天)
显示 更早的评论
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) ?
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!