Symbolic Toolbox Matlab 2008a

<ul><li><p>Symbolic Math Toolbox 5Users Guide</p></li><li><p>How to Contact MathWorks</p><p>www.mathworks.com Webcomp.soft-sys.matlab Newsgroupwww.mathworks.com/contact_TS.html Technical Supportsuggest@mathworks.com Product enhancement suggestionsbugs@mathworks.com Bug reportsdoc@mathworks.com Documentation error reportsservice@mathworks.com Order status, license renewals, passcodesinfo@mathworks.com Sales, pricing, and general information</p><p>508-647-7000 (Phone)</p><p>508-647-7001 (Fax)</p><p>The MathWorks, Inc.3 Apple Hill DriveNatick, MA 01760-2098For contact information about worldwide offices, see the MathWorks Web site.Symbolic Math Toolbox Users Guide COPYRIGHT 19932010 by The MathWorks, Inc.The software described in this document is furnished under a license agreement. The software may be usedor copied only under the terms of the license agreement. No part of this manual may be photocopied orreproduced in any form without prior written consent from The MathWorks, Inc.FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentationby, for, or through the federal government of the United States. By accepting delivery of the Programor Documentation, the government hereby agrees that this software or documentation qualifies ascommercial computer software or commercial computer software documentation as such terms are usedor defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms andconditions of this Agreement and only those rights specified in this Agreement, shall pertain to and governthe use, modification, reproduction, release, performance, display, and disclosure of the Program andDocumentation by the federal government (or other entity acquiring for or through the federal government)and shall supersede any conflicting contractual terms or conditions. If this License fails to meet thegovernments needs or is inconsistent in any respect with federal procurement law, the government agreesto return the Program and Documentation, unused, to The MathWorks, Inc.</p><p>Trademarks</p><p>MATLAB and Simulink are registered trademarks of The MathWorks, Inc. Seewww.mathworks.com/trademarks for a list of additional trademarks. Other product or brandnames may be trademarks or registered trademarks of their respective holders.Patents</p><p>MathWorks products are protected by one or more U.S. patents. Please seewww.mathworks.com/patents for more information.</p></li><li><p>Revision HistoryAugust 1993 First printingOctober 1994 Second printingMay 1997 Third printing Revised for Version 2May 2000 Fourth printing Minor changesJune 2001 Fifth printing Minor changesJuly 2002 Online only Revised for Version 2.1.3 (Release 13)October 2002 Online only Revised for Version 3.0.1December 2002 Sixth printingJune 2004 Seventh printing Revised for Version 3.1 (Release 14)October 2004 Online only Revised for Version 3.1.1 (Release 14SP1)March 2005 Online only Revised for Version 3.1.2 (Release 14SP2)September 2005 Online only Revised for Version 3.1.3 (Release 14SP3)March 2006 Online only Revised for Version 3.1.4 (Release 2006a)September 2006 Online only Revised for Version 3.1.5 (Release 2006b)March 2007 Online only Revised for Version 3.2 (Release 2007a)September 2007 Online only Revised for Version 3.2.2 (Release 2007b)March 2008 Online only Revised for Version 3.2.3 (Release 2008a)October 2008 Online only Revised for Version 5.0 (Release 2008a+)October 2008 Online only Revised for Version 5.1 (Release 2008b)November 2008 Online only Revised for Version 4.9 (Release 2007b+)March 2009 Online only Revised for Version 5.2 (Release 2009a)September 2009 Online only Revised for Version 5.3 (Release 2009b)March 2010 Online only Revised for Version 5.4 (Release 2010a)September 2010 Online only Revised for Version 5.5 (Release 2010b)</p></li><li><p>Contents</p><p>Introduction1</p><p>Product Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2</p><p>Accessing Symbolic Math Toolbox Functionality . . . . . 1-3Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3Working from MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3Working from MuPAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3</p><p>Getting Started</p><p>2Symbolic Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2Symbolic Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2Symbolic Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3</p><p>Creating Symbolic Variables and Expressions . . . . . . . . 2-6Creating Symbolic Variables . . . . . . . . . . . . . . . . . . . . . . . . 2-6Creating Symbolic Expressions . . . . . . . . . . . . . . . . . . . . . . 2-7Creating Symbolic Objects with Identical Names . . . . . . . . 2-8Creating a Matrix of Symbolic Variables . . . . . . . . . . . . . . . 2-9Creating a Matrix of Symbolic Numbers . . . . . . . . . . . . . . . 2-10Finding Symbolic Variables in Expressions andMatrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11</p><p>Performing Symbolic Computations . . . . . . . . . . . . . . . . . 2-13Simplifying Symbolic Expressions . . . . . . . . . . . . . . . . . . . . 2-13Substituting in Symbolic Expressions . . . . . . . . . . . . . . . . . 2-15Estimating the Precision of Numeric to SymbolicConversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18</p><p>Differentiating Symbolic Expressions . . . . . . . . . . . . . . . . . 2-20Integrating Symbolic Expressions . . . . . . . . . . . . . . . . . . . . 2-22</p><p>v</p></li><li><p>Solving Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24Finding a Default Symbolic Variable . . . . . . . . . . . . . . . . . . 2-26Creating Plots of Symbolic Functions . . . . . . . . . . . . . . . . . 2-26</p><p>Assumptions for Symbolic Objects . . . . . . . . . . . . . . . . . . 2-31Default Assumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31Setting Assumptions for Symbolic Variables . . . . . . . . . . . 2-31Deleting Symbolic Objects and Their Assumptions . . . . . . 2-32</p><p>Using Symbolic Math Toolbox Software</p><p>3Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12Symbolic Summation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19Taylor Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20Calculus Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22Extended Calculus Example . . . . . . . . . . . . . . . . . . . . . . . . . 3-30</p><p>Simplifications and Substitutions . . . . . . . . . . . . . . . . . . . 3-42Simplifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-42Substitutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-53</p><p>Variable-Precision Arithmetic . . . . . . . . . . . . . . . . . . . . . . 3-60Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-60Example: Using the Different Kinds of Arithmetic . . . . . . 3-61Another Example Using Different Kinds of Arithmetic . . . 3-64</p><p>Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-66Basic Algebraic Operations . . . . . . . . . . . . . . . . . . . . . . . . . 3-66Linear Algebraic Operations . . . . . . . . . . . . . . . . . . . . . . . . 3-67Eigenvalues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-72Jordan Canonical Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-77Singular Value Decomposition . . . . . . . . . . . . . . . . . . . . . . . 3-79Eigenvalue Trajectories . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-82</p><p>vi Contents</p></li><li><p>Solving Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-93Solving Algebraic Equations . . . . . . . . . . . . . . . . . . . . . . . . . 3-93Several Algebraic Equations . . . . . . . . . . . . . . . . . . . . . . . . 3-94Single Differential Equation . . . . . . . . . . . . . . . . . . . . . . . . . 3-97Several Differential Equations . . . . . . . . . . . . . . . . . . . . . . . 3-100</p><p>Integral Transforms and Z-Transforms . . . . . . . . . . . . . . 3-103The Fourier and Inverse Fourier Transforms . . . . . . . . . . . 3-103The Laplace and Inverse Laplace Transforms . . . . . . . . . . 3-110The Z and Inverse Ztransforms . . . . . . . . . . . . . . . . . . . . 3-116</p><p>Special Functions of Applied Mathematics . . . . . . . . . . . 3-120Numerical Evaluation of Special Functions Using mfun . . 3-120Syntax and Definitions of mfun Special Functions . . . . . . . 3-121Diffraction Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-126</p><p>Using Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-129Creating Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-129Exploring Function Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-140Editing Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-142Saving Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-143</p><p>Generating Code from Symbolic Expressions . . . . . . . . . 3-145Generating C or Fortran Code . . . . . . . . . . . . . . . . . . . . . . . 3-145Generating MATLAB Functions . . . . . . . . . . . . . . . . . . . . . 3-146Generating Embedded MATLAB Function Blocks . . . . . . . 3-151Generating Simscape Equations . . . . . . . . . . . . . . . . . . . . . 3-155</p><p>MuPAD in Symbolic Math Toolbox</p><p>4Understanding MuPAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2Introduction to MuPAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2The MATLAB Workspace and MuPAD Engines . . . . . . . . . 4-2Introductory Example Using a MuPAD Notebook fromMATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3</p><p>MuPAD for MATLAB Users . . . . . . . . . . . . . . . . . . . . . . . . . 4-10</p><p>vii</p></li><li><p>Getting Help for MuPAD . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10Launching, Opening, and Saving MuPAD Notebooks . . . . 4-12Opening Recent Files and Other MuPAD Interfaces . . . . . 4-13Calculating in a MuPAD Notebook . . . . . . . . . . . . . . . . . . . 4-15Differences Between MATLAB and MuPAD Syntax . . . . . 4-21</p><p>Integration of MuPAD and MATLAB . . . . . . . . . . . . . . . . 4-25Copying Variables and Expressions Between the MATLABWorkspace and MuPAD Notebooks . . . . . . . . . . . . . . . . . 4-25</p><p>Calling MuPAD Functions at the MATLAB CommandLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28</p><p>Clearing Assumptions and Resetting the SymbolicEngine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33</p><p>Function Reference5</p><p>Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2</p><p>Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2</p><p>Simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3</p><p>Solution of Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4</p><p>Variable Precision Arithmetic . . . . . . . . . . . . . . . . . . . . . . 5-4</p><p>Arithmetic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4</p><p>Special Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5</p><p>MuPAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5</p><p>Pedagogical and Graphical Applications . . . . . . . . . . . . . 5-6</p><p>Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7</p><p>viii Contents</p></li><li><p>Basic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8</p><p>Integral and Z-Transforms . . . . . . . . . . . . . . . . . . . . . . . . . 5-9</p><p>Functions Alphabetical List</p><p>6</p><p>Index</p><p>ix</p></li><li><p>x Contents</p></li><li><p>1Introduction</p><p> Product Overview on page 1-2 Accessing Symbolic Math Toolbox Functionality on page 1-3</p></li><li><p>1 Introduction</p><p>Product OverviewSymbolic Math Toolbox software lets you to perform symbolic computationswithin the MATLAB numeric environment. It provides tools for solving andmanipulating symbolic math expressions and performing variable-precisionarithmetic. The toolbox contains hundreds of symbolic functions that leveragethe MuPAD engine for a broad range of mathematical tasks such as:</p><p> Differentiation Integration Linear algebraic operations Simplification Transforms Variable-precision arithmetic Equation solving</p><p>Symbolic Math Toolbox software also includes the MuPAD language, whichis optimized for handling and operating on symbolic math expressions. Inaddition to covering common mathematical tasks, the libraries of MuPADfunctions cover specialized areas such as number theory and combinatorics.You can extend the built-in functionality by writing custom symbolic functionsand libraries in the MuPAD language.</p><p>1-2</p></li><li><p>Accessing Symbolic Math Toolbox Functionality</p><p>Accessing Symbolic Math Toolbox Functionality</p><p>Key FeaturesSymbolic Math Toolbox software provides a complete set of tools for symboliccomputing that augments the numeric capabilities of MATLAB. The toolboxincludes extensive symbolic functionality that you can access directly fromthe MATLAB command line or from the MuPAD Notebook Interface. You canextend the functionality available in the toolbox by writing custom symbolicfunctions or libraries in the MuPAD language.</p><p>Working from MATLABYou can access the Symbolic Math Toolbox functionality directly from theMATLAB Command Window. This environment lets you call functions usingfamiliar MATLAB syntax.</p><p>The MATLAB Help browser presents the documentation that covers workingfrom the MATLAB Command Window. To access the MATLAB Help browser,you can:</p><p> Select Help &gt; Product Help , and then select Symbolic Math Toolboxin the left pane</p><p> Enter doc at the MATLAB command line</p><p>If you are a new user, begin with Chapter 2, Getting Started</p><p>Working from MuPADAlso you can access the Symbolic Math Toolbox functionality from the MuPADNotebook Interface using the MuPAD language. The MuPAD NotebookInterface includes a symbol palette for accessing common MuPAD functions.All results are displayed in typeset math. You also can convert the resultsinto MathML and TeX. You can embed graphics, animations, and descriptivetext within your notebook.</p><p>An editor, debugger, and other programming utilities provide tools forauthoring custom symbolic functions and libraries in the MuPAD language.The MuPAD language supports multiple programming styles including</p><p>1-3</p></li><li><p>1 Introduction</p><p>imperative, functional, and object-...</p></li></ul>

MATLAB 2008a Released While not on disk yet, MATLAB release 2008a (MATLAB 7.6) is available for download from the MathWorks for licensed users. This release brings news on several fronts: The Statistics Toolbox has seen a number of interesting additions, including: quasirandom number generators and (sequential) feature selection and cross. Slow symbolic toolbox startup in MATLAB 2009a. A version of MATLAB for distribution to my employer’s standard student Windows desktop image and so I got to test MATLAB 2009a on Windows for the first time. While testing the deployed version of MATLAB I discovered that it seemed to hang when you tried to initialise the symbolic toolbox. † The Symbolic Math Toolbox software is a collection of more than 100 MATLAB functions that provide access to the MuPAD kernel using a syntax and style that is a natural extension of the MATLAB language. Since it is restricted to the class of polynomials, it offers better performance and more flexibility than a sym object in the Symbolic Toolbox. Sympoly is an extended version of the 'Symbolic Polynomial Manipulation' package by John D'Errico using new-style MatLab classes with slight differences in implementation and function signatures.

Once you have obtained a copy of the Symbolic Math Toolbox to use with MATLAB, you should have a number of files on your hard drive. These files provide everything needed to install the Symbolic Math Toolbox. You have two ways by which you can interact with the files:

In older versions of the Symbolic Toolbox (2008a and earlier) it was a completely different application that did the symbolic grunt work on MATLAB’s behalf, namely Maple. For some reason, known only to Maplesoft and Mathworks, Maple was dropped from the symbolic toolbox in. Symbolic Math Toolbox™ User’s Guide R2013a. How to Contact MathWorks www.mathworks.com Web. (Release 2008a) October 2008 Online only Revised for Version 5.0 (Release 2008a+). Work from MATLAB You can access the Symbolic Math Toolbox functionality directly from the.

If you were able to use the download agent, you see a dialog box telling you that the download is complete. At this point, you can perform one of these two tasks:

Select the Start Installer option and click Finish to start the installation process. The Symbolic Math Toolbox installer will start automatically.

Select the Open Location of the Downloaded Files option and click Finish. You see the location of the files open, and you must double-click the installer file to start the installation process. (The installer file is typically the only executable program in the folder.)

If you performed the manual download process, you need to find the download location of the files. You must double-click the installer file to start the installation process. (The installer file is typically the only executable program in the folder.)

Windows platform users may see a User Account Control (UAC) dialog box when starting the installer. Click Yes to give the installer permission to install the Symbolic Math Toolbox. Otherwise, the installation will fail.

Download Symbolic Math Toolbox For Matlab 2008a

No matter how you start the installer, eventually you see a MathWorks installer dialog box. This dialog box determines the source of the files that you use to perform the installation. (Choosing the Install Using the Internet option downloads the files directly from the MathWorks site — you also have the option of using source files on your hard drive.) The following steps help you complete the installation process.

1Select an installation source (either Internet or local hard drive) and click Next.

Download symbolic math toolbox for matlab 2008a

You see the License Agreement dialog box.

2Read the licensing agreement, click Yes, and then click Next.

You see the File Installation Key dialog box. This is where you supply the licensing information. If you don’t have the key, make sure that you select the second option and follow the steps required to obtain the license.

3Supply the File Installation Key and click Next.

The installer asks you to select an installation method. In most cases, you obtain a better, faster, more error-free installation by selecting the Typical option. The steps that follow assume that you have chosen the Typical option.

Symbolic Toolbox Matlab Freezes

4Click the Typical option and then click Next.

Matlab Toolbox List

The installer asks you to choose an installation destination. This destination differs by platform. In most cases, choosing the default installation destination is the best idea. However, if you have an existing installation and want to preserve this installation precisely as it is, you need to choose a different installation location.

5Choose a destination location, if necessary, and click Next.

If you already have a copy of MATLAB installed and you choose the default installation location, the installer will ask whether you want to overwrite the existing copy. Click Yes To All (if you need to update your copy of MATLAB) or No (when you have the most current version) to proceed.

Matlab 2008a Download

When you click Yes To All, you agree to allow the installer to remove your old copy of MATLAB and install a new one. Be aware that you’ll likely lose any special configuration options you have set up, along with any features you had installed previously.

The installer displays a Confirmation dialog box. Check the details carefully to ensure that the installation provides everything you need.

6Click Install.

The installation process begins. You can watch the progress by checking the progress bar. The installation can require several minutes depending on the installation options you choose, the complexity of the installation, and the speed of your system.

When the installation process is complete, you see an Installation Complete dialog box.

7Select the Activate MATLAB option and then click Next.

MATLAB asks whether you want to activate your copy using the Internet or manually. Using the Internet is generally the faster and easier option, unless you have already downloaded a license file (license.lic) as part of getting the file installation key.

8Choose an activation option and click Next.

When you choose the Internet option, you must provide your email address and password to log on to the system for activation purposes. If you don’t have an account, you can also choose to create an account or provide the location of your locally stored license.lic file.

9Supply any required input and click Next.

If activation is successful, you see an Activation Complete dialog box. (When you don’t see this dialog box, retry obtaining the required activation or contact MathWorks support.)