from the Forum department...
connecting matlab m file to simulink
Motion control, servos, steppers, etc. topic
Posted by pinky on 26 June, 2009 - 7:23 am
[moderator's note: See thread]

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]

Posted by sershap on 28 June, 2009 - 5:14 pm

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,

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2014 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.

If you stand on your head, you will get footprints in your hair.
Advertise here
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive