Import Excel files directly to simulink (R2010a)
Show older comments
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??
Answers (1)
Andreas Goser
on 10 Dec 2012
0 votes
"Directly" is a relative term... I suggest the following:
- Achieve to import the data int MATLAB with a command like XLSREAD
- Maybe post process the data in a way it satisfies the formatting needs of your Simulink source block
- Add those couple of line into your Simulink as a callback that gets exectutes befor you start simulating the model, e.g. the PRELOADFCN
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!