S-Functions Simulik

Páginas: 104 (25757 palabras) Publicado: 27 de mayo de 2012
®

Model-Based and System-Based Design

Writing S-Functions
Version 5

How to Contact The MathWorks:
www.mathworks.com comp.soft-sys.matlab support@mathworks.com suggest@mathworks.com bugs@mathworks.com doc@mathworks.com service@mathworks.com info@mathworks.com

Web Newsgroup Technical support Product enhancement suggestions Bug reports Documentation error reports Order status, licenserenewals, passcodes Sales, pricing, and general information Phone Fax Mail

508-647-7000 508-647-7001 The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098

For contact information about worldwide offices, see the MathWorks Web site. Writing S-Functions © COPYRIGHT 1998 - 2004 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. Thesoftware may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by or for the federal government of the United States. By accepting delivery of the Program, thegovernment hereby agrees that this software qualifies as "commercial" computer software within the meaning of FAR Part 12.212, DFARS Part 227.7202-1, DFARS Part 227.7202-3, DFARS Part 252.227-7013, and DFARS Part 252.227-7014. The terms and conditions of The MathWorks, Inc. Software License Agreement shall pertain to the government’s use and disclosure of the Program and Documentation, and shallsupersede any conflicting contractual terms or conditions. If this license fails to meet the government’s minimum needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to MathWorks. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and TargetBox is a trademark of TheMathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders.

Printing History: October 1998 First printing Revised for Simulink 3.0 (Release 11) November 2000 Second printingRevised for Simulink 4.0 (Release 12) June 2001 Online only Revised for Simulink 4.1 (Release 12.1) July 2002 Third printing Revised for Simulink 5.0 (Release 13) September 2003Online only Revised for Simulink 5.1 (Release 13SP1) October 2004 Online only Revised for Simulink 5.2 (Release 13SP2)

Contents
Overview of S-Functions

1
What Is an S-Function? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Using S-Functions in Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Passing Parameters to S-Functions . . . . . . . . . . . . .. . . . . . . . . 1-4 When to Use an S-Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 How S-Functions Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mathematics of Simulink Blocks . . . . . . . . . . . . . . . . . . . . . . . . Simulation Stages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S-Function Callback Methods . . . . .. . . . . . . . . . . . . . . . . . . . . .
1-6 1-6 1-6 1-9

Implementing S-Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 M-File S-Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 MEX-File S-Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11 S-Function Concepts . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . Direct Feedthrough . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dynamically Sized Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Sample Times and Offsets . . . . . . . . . . . . . . . . . . . . . .
1-13 1-13 1-13 1-15

S-Function Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18

Writing M...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Functions
  • EXPONENCIAL AND LOGARITHMIC FUNCTIONS
  • S
  • S
  • S
  • S
  • La s ti
  • LAS S

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS