4.33333

4.3 | 9 ratings Rate this file 28 downloads (last 30 days) File Size: 89.39 KB File ID: #5913

Examples of incorporating m-code into Simulink models

by Jason Ghidella

 

23 Sep 2004 (Updated 24 Sep 2004)

No BSD License  

Example Simulink models to support a MATLAB Digest article from September 2004.

Download Now | Watch this File

File Information
Description

Simulink 6 has introduced additional methods for incorporating M-code into Simulink models. Learn about the different methods of using M-code when modeling dynamic systems for simulation and code generation and how to choose the appropriate approach for your application.

The September 2004 MATLAB Digest contains an article called "Incorporating M-code into Simulink models" by Fred Smith and Jason Ghidella

http://www.mathworks.com/company/newsletters/

Instructions:
* Unzip the files into a new directory
* run the m-file "runme.m", this will open up a HTML document describing the different models.
* Step through the different models to compare the implementations.
*If you have the Simulink Accelerator, you can also run profile reports to see the time taken by each block, once the simulation is completed.

Required Products Simulink
MATLAB release MATLAB 7 (R14)
Other requirements optionally, Simulink Accelerator
Zip File Content  
Published M Files Different ways of incorporating M-code into Simulink
Other Files
ml_digest_examples/html/examples_eq240175.png,
ml_digest_examples/runme.m,
ml_digest_examples/eqn_mlfcn.m,
ml_digest_examples/aero_raddat.m,
ml_digest_examples/aero_plot_mlfcn.m,
ml_digest_examples/eqn_L1_msfcn.m,
ml_digest_examples/aero_extkalman_L2_msfcn.m,
ml_digest_examples/aero_plot_L2_msfcn.m,
ml_digest_examples/aero_extkalman_mlfcn.m,
ml_digest_examples/eqn_L2_msfcn.m,
ml_digest_examples/low_sim.mdl,
ml_digest_examples/eqn_sim_ss.mdl,
ml_digest_examples/aero_radar_mlfcn.mdl,
ml_digest_examples/eqn_sim_eml.mdl,
ml_digest_examples/aero_radar_eml.mdl,
ml_digest_examples/examples.m,
ml_digest_examples/eqn_sim_L1_msfcn.mdl,
ml_digest_examples/eqn_sim_L2_msfcn.mdl,
ml_digest_examples/eqn_sim_fcn.mdl,
ml_digest_examples/eqn_sim_mlfcn.mdl,
ml_digest_examples/aero_radar_L2_msfcn.mdl
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
24 Sep 2004 hamid bakhtiary  
29 Mar 2005 S. F.

I needed a very simple S-function to update the global workspace during simulation and I never wrote an S-function before. The templates had too much detail. These examples were perfect.
(sorry, my company has very strong legal requirements about publishing organization names- I can not give you my name / company)

08 May 2005 Rajput Ajay  
14 Dec 2005 Hernando Jr N.

A perfect way to learn about level 2 S-functions and the difference between level 2 and level 1

23 Jun 2007 Farid Kamaliyev  
08 Oct 2007 Ximena Perez  
18 May 2008 julio VALADEZ

excellent

11 Jul 2008 blue phoenix

thank you so much, it help me a lot.
bluephoenix
http://engineer4myanmar.com

21 Aug 2008 shrikant katre  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
simulink Jason Ghidella 22 Oct 2008 07:31:54
sfunctions Jason Ghidella 22 Oct 2008 07:31:54
embedded matlab Jason Ghidella 22 Oct 2008 07:31:54
fcn Jason Ghidella 22 Oct 2008 07:31:54
mfiles Jason Ghidella 22 Oct 2008 07:31:54
sfunctions Odiri Oghre 24 Feb 2009 04:11:04
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com