Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Reading and Writing files - Simulink
Replies: 3   Last Post: Feb 17, 2013 8:46 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ryan Spooner

Posts: 1
Registered: 3/21/11
Reading and Writing files - Simulink
Posted: Mar 21, 2011 3:36 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Does anyone know how to read a txt file or excel file while a simulink simulation is running?
Ive tried using the embedded Matlab block but it keeps giving an error saying that the fopen as well as xlsread is not supported. Is there a libary i have to add or is there another function block avaliable?
This is some of the code used. I know how to read and write in matlab no problems.
% Read Hourly Rates
HourlyRate = fopen('HourlyRate.xls', 'r');
HourlyRateEast = xlsread('HourlyRate.xls'); *(i do know fopen and fclose are not nessary for xlsread but i also use fprintf)
fclose(HourlyRate);

THANKS



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.