Import Excel files directly to simulink (R2010a)

Import Excel files directly to simulink (R2010a)
I need to use data in a excel sheet as an input in simulink. I want to actuate a simmechanics model (through a revolute joint) according to a signal that is generated based on values in a excel file (time and angle, kind of a sine wave)
Anyone know a solution??

回答(1 个)

"Directly" is a relative term... I suggest the following:
  1. Achieve to import the data int MATLAB with a command like XLSREAD
  2. Maybe post process the data in a way it satisfies the formatting needs of your Simulink source block
  3. Add those couple of line into your Simulink as a callback that gets exectutes befor you start simulating the model, e.g. the PRELOADFCN

类别

在 帮助中心 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息

提问:

2012-12-10

Community Treasure Hunt

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

Start Hunting!

Translated by