Sulaymon Eshkabilov
Fargo, United States
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/9781484250600 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-5060-0 e-ISBN 978-1-4842-5061-7
https://doi.org/10.1007/978-1-4842-5061-7
Sulaymon Eshkabilov 2019
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Introduction
This book is aimed at beginner-level learners of MATLAB/Simulink packages. It covers the essential, hands-on tools and functions of the MATLAB and Simulink packages, and explains them via interactive examples and case studies. The main principle of the book is learning by doing and it progresses from simple to complex. It contains dozens of solutions and simulation models via M/MLX files/scripts and Simulink models, which help you learn the programming and modeling essentials. Moreover, there are many recommendations for avoiding pitfalls related to programming and modeling aspects of MATLAB/Simulink packages.
Beginning MATLAB and Simulink explains various practical issues of programming and modeling in parallel by comparing programming tools of MATLAB and blocks of Simulink. After studying this book, youll be proficient at using MATLAB/Simulink packages. You can apply the source code and models from the books examples as templates to your own projects in data science, numerical analysis, modeling and simulation, or engineering.
Essential learning outcomes of the book include:
Getting started using MATLAB and Simulink
Performing data analysis and visualization with MATLAB
Programming essentials of MATLAB and core modeling aspects of Simulink, and how to associate scripts and models of MATLAB and Simulink packages
Developing GUI models and standalone applications in MATLAB
Working with integration and numerical root-finding methods in MATLAB and Simulink
Solving differential equations in MATLAB and Simulink
Applying MATLAB for data analysis and data science projects
The book contains eight logically interlinked chapters.
Chapteris dedicated to introducing the MATLAB environment and MATLAB recognized data types, including numeric, cell, structure, character, logical, function handle, and table.
Chaptercovers most of the essential programming tools and functions, such as for end and while end loop operators, ifelseifelseend condition operators, symbol referencing, and most common errors and warnings. It also covers M-file debugging tools and options in MATLAB. Moreover, this chapter addresses MATLAB-specific programming tools, including function files, function handles, and display operators, such as disp() , display , fprintf , and sprint .
Chaptercovers GUI development and how to write and edit GUI model callback functions.
Chapteraddresses the issues of how to develop MEX files, C/C++ code, and standalone applications from the existing M-files.
Chapteris dedicated to Simulink modeling essentials. The examples in this chapter cover matrix operations, computing function values, modeling, and solving ordinary differential equations. Moreover, it covers issues around how to associate Simulink models with MATLAB scripts.
Chapteris devoted to data visualization issues, such as building 2D and 3D plots and animated plots in MATLAB.
Chapteris dedicated to matrix algebra and array operations. It addresses solving systems linear equations, eigen-value problems, matrix decompositions, matrix and vector operations, and conversions of arrays and strings via examples solved in MATLAB and Simulink in parallel.
Chaptercovers some essential aspects of solving ordinary differential equations analytically and using MATLABs built in functions and commands.
All of the source code (scripts, M/MLX/MAT files, Simulink models, SLX/MDL files, C code, MEX-files, and installation *.exe files) discussed in the book are available to readers via a Download Source Code button on the books apress.com product page and accessible via the Download Source Code link located at www.apress.com/9781484250600 .
Note
The scripts in the book may not always be the best solutions to the given problems, but this is done intentionally in order to emphasize methods used to improve them. In some other cases, it is found to be the most appropriate solution to the authors best knowledge. Should I spot better alternative solutions to exercises, I will publish them via MathWorks MATLAB Central User Communitys file exchange, via my file exchange link there (under my name).
No matter how hard we worked to proofread this book, it is inevitable that there will be some typographical errors that might slip through and will appear in print.
September 2019 Sulaymon Eshkabilov
Acknowledgments
I would like to express my special gratitude to the technical reviewers of this bookDr. Joseph Mueller and Mr. Karpur Shuklafor their very thorough work while reviewing the context and code of the book. Without their critical insights and corrections many points along the way, the book would not be as good as it is now. I would also like to express my special gratitude to Mark Powers for his timely and well planned correspondence throughout this book project.