Today is...
Monday, December 22, 2014
Welcome to Control.com, the global online
community of automation professionals.
Advertisement
Featured Video...
Featured Video
A quick introduction to EtherCAT for motion control and I/O...
Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
connecting matlab m file to simulink
matlab m file programm as a block in simulink.

[moderator's note: See thread http://www.control.com/thread/1245689960]

as a part of my project, i need matlab m file programm as a block in simulink. there are some user defined functions in simulink like sfunction. embedded matlab function blocks are available and i wrote the programs but shows some error... if any body can help me plz... i am doing simulation in simulink and to reduce the complexity. i thought of writing progms in m file but i failed to make it as a simulink block.. if anybody knows the way of using embedded matlab function plz

my email id is pinky1766 [at] gmail.com

Hi,

MATLAB has well-documented help and examples concerning S-Functions. Visit following folder in Simulink Library Browser: [Simulink->User-Defined Functions->S-Function examples] system for more information
Also, there is one more way to include m-file calculations into Simulink: write a general m-file function and use it within [Simulink->User-Defined Functions->MATLAB Function] library block

Best regards,
Serg
http://sse.xtreemhost.com