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??

Risposte (1)

Andreas Goser
Andreas Goser il 10 Dic 2012
"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

Categorie

Richiesto:

il 10 Dic 2012

Community Treasure Hunt

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

Start Hunting!

Translated by