User manual THE MATHWORKS SYMBOLIC MATH TOOLBOX 5

DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!

If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Diplodocs provides you a fast and easy access to the user manual THE MATHWORKS SYMBOLIC MATH TOOLBOX 5. We hope that this THE MATHWORKS SYMBOLIC MATH TOOLBOX 5 user guide will be useful to you.


THE MATHWORKS SYMBOLIC MATH TOOLBOX 5 : Download the complete user guide (1865 Ko)

You may also download the following manuals related to this product:

   THE MATHWORKS SYMBOLIC MATH TOOLBOX 5 MUPAD TUTORIAL (1877 ko)

Manual abstract: user guide THE MATHWORKS SYMBOLIC MATH TOOLBOX 5

Detailed instructions for use are in the User's Guide.

[. . . ] Symbolic Math ToolboxTM 5 User's Guide How to Contact MathWorks Web Newsgroup www. mathworks. com/contact_TS. html Technical Support www. mathworks. com comp. soft-sys. matlab suggest@mathworks. com bugs@mathworks. com doc@mathworks. com service@mathworks. com info@mathworks. com Product enhancement suggestions Bug reports Documentation error reports Order status, license renewals, passcodes Sales, pricing, and general information 508-647-7000 (Phone) 508-647-7001 (Fax) The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 For contact information about worldwide offices, see the MathWorks Web site. Symbolic Math ToolboxTM User's Guide © COPYRIGHT 1993­2010 by The MathWorks, Inc. The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. [. . . ] To open a block, select Edit>Open Block or use the context menu. Controlling the Order of Input Ports emlBlock generates input variables and the corresponding input ports in alphabetical order from a symbolic expression. To change the order of input variables, use the vars option: syms x y; mu = sym('mu'); dydt = -x - mu*y*(x^2 - 1); emlBlock('my_system/vdp', dydt, . . . 'vars', [y mu x]); Naming the Output Ports By default, emlBlock generates the names of the output ports as the word out followed by the output port number, for example, out3. The output option allows you to use the custom names of the output ports: syms x y; mu = sym('mu'); dydt = -x - mu*y*(x^2 - 1); emlBlock('my_system/vdp', dydt, . . . 3-154 Generating Code from Symbolic Expressions 'outputs', {'name1'}); Converting MuPAD Expressions You can convert a MuPAD expression or function to an Embedded MATLAB Function block: syms x y; f = evalin(symengine, 'arcsin(x) + arccos(y)'); emlBlock('my_system/my_block', f); The resulting block contains the same expressions written in the MATLAB language: function f = my_block(x, y) %#eml f = asin(x) + acos(y); Note Some MuPAD expressions cannot be correctly converted to a block. When converting a MuPAD expression or function that is not on the MATLAB vs. To verify the results, you can: · Run the simulation containing the resulting block · Open the block and verify that all the functions are defined in the Embedded MATLAB Function Library Generating Simscape Equations SimscapeTM software extends the Simulink product line with tools for modeling and simulating multidomain physical systems, such as those with mechanical, hydraulic, pneumatic, thermal, and electrical components. Unlike other Simulink blocks, which represent mathematical operations or operate on signals, Simscape blocks represent physical components or 3-155 3 Using Symbolic Math ToolboxTM Software relationships directly. With Simscape blocks, you build a model of a system just as you would assemble a physical system. You can extend the Simscape modeling environment by creating custom components. When you define a component, use the equation section of the component file to establish the mathematical relationships among a component's variables, parameters, inputs, outputs, time, and the time derivatives of each of these entities. The Symbolic Math Toolbox and Simscape software let you perform symbolic computations and use the results of these computations in the equation section. The simscapeEquation function translates the results of symbolic computations to Simscape language equations. Converting Algebraic and Differential Equations Suppose, you want to generate a Simscape equation from the solution of the following ordinary differential equation. As a first step, use the dsolve function to solve the equation: s = dsolve('D2y = -a^2*y', 'y(0) = 1', 'Dy(pi/a) = 0'); s = simplify(s) The solution is: s= cos(a*t) Then, use the simscapeEquation function to rewrite the solution in the Simscape language: simscapeEquation(s) simscapeEquation generates the following code : ans = s == cos(a*time) The variable time replaces all instances of the variable t except for derivatives with respect to t. To use the generated equation, copy the equation and paste it to the equation section of the Simscape component file. Do not copy the automatically generated variable ans and the equal sign that follows it. 3-156 Generating Code from Symbolic Expressions simscapeEquation converts any derivative with respect to the variable t to the Simscape notation, X. der, where X is the time-dependent variable. For example, convert the following differential equation to a Simscape equation. Also, here you explicitly specify the left and the right sides of the equation by using the syntax simscapeEquation(LHS, RHS): syms a; x = sym('x(t)'); simscapeEquation(diff(x), -a^2*x) ans = x. der == -a^2*x simscapeEquation also translates piecewise expressions to the Simscape language. For example, the result of the following Fourier transform is a piecewise function: syms v u; syms x real; f = exp(-x^2*abs(v))*sin(v)/v; s = fourier(f, v, u) s= piecewise([x <> 0, atan((u + 1)/x^2) - atan((u - 1)/x^2)]) From this symbolic piecewise equation, simscapeEquation generates valid code for the equation section of a Simscape component file: simscapeEquation(s) ans = s == if x ~= 0, atan((u + 1)/x^2) - atan((u - 1)/x^2) end Clear the assumption that x is real: syms x clear Converting MuPAD Equations If you perform symbolic computations in the MuPAD Notebook Interface and want to convert the results to Simscape equations, use the generate::Simscape function in MuPAD. 3-157 3 Using Symbolic Math ToolboxTM Software Limitations The equation section of a Simscape component file supports a limited number of functions. If a symbolic equation contains the functions that the equation section of a Simscape component file does not support. simscapeEquation cannot correctly convert these equations to Simscape equations. The following types of expressions are prone to invalid conversion: · Expressions with infinities · Expressions returned by evalin and feval. 3-158 4 MuPAD in Symbolic Math Toolbox · "Understanding MuPAD" on page 4-2 · "MuPAD for MATLAB Users" on page 4-10 · "Integration of MuPAD and MATLAB" on page 4-25 4 MuPAD® in Symbolic Math ToolboxTM Understanding MuPAD In this section. . . "Introduction to MuPAD" on page 4-2 "The MATLAB Workspace and MuPAD Engines" on page 4-2 "Introductory Example Using a MuPAD Notebook from MATLAB" on page 4-3 Introduction to MuPAD Version 5 of Symbolic Math Toolbox is powered by the MuPAD symbolic engine. [. . . ] triu(A, k) returns a matrix that retains the elements of A on and above the k-th diagonal. The values k = 0, k > 0, and k < 0 correspond to the main, superdiagonals, and subdiagonals, respectively. Examples Display the matrix retaining only the upper triangle of the original symbolic matrix: syms a b c A = [a b c; 1 2 3; a + 1 b + 2 c + 3]; triu(A) The result is: ans = [ a, b, c] [ 0, 2, 3] [ 0, 0, c + 3] Display the matrix that retains the elements of the original symbolic matrix on and above the first superdiagonal: syms a b c A = [a b c; 1 2 3; a + 1 b + 2 c + 3]; triu(A, 1) The result is: 6-216 triu ans = [ 0, b, c] [ 0, 0, 3] [ 0, 0, 0] Display the matrix that retains the elements of the original symbolic matrix on and above the first subdiagonal: syms a b c A = [a b c; 1 2 3; a + 1 b + 2 c + 3]; triu(A, -1) The result is: ans = [ a, b, c] [ 1, 2, 3] [ 0, b + 2, c + 3] See Also diag | tril 6-217 uint8, uint16, uint32, uint64 Purpose Syntax Convert symbolic matrix to unsigned integers uint8(S) uint16(S) uint32(S) uint64(S) uint8(S) converts a symbolic matrix S to a matrix of unsigned 8-bit Description integers. uint16(S) converts S to a matrix of unsigned 16-bit integers. uint64(S) converts S to a matrix of unsigned 64-bit integers. Note The output of uint8, uint16, uint32, and uint64 does not have type symbolic. Bytes per Element 1 2 4 8 Output Class uint8 uint16 uint32 uint64 Function uint8 uint16 uint32 uint64 Output Range 0 to 255 0 to 65, 535 0 to 4, 294, 967, 295 0 to 18, 446, 744, 073, 709, 551, 615 Output Type Unsigned 8-bit integer Unsigned 16-bit integer Unsigned 32-bit integer Unsigned 64-bit integer See Also sym, vpa, single, double, int8, int16, int32, int64 6-218 vpa Purpose Syntax Description Variable precision arithmetic R = vpa(A) R = vpa(A, d) R = vpa(A) uses variable-precision arithmetic (VPA) to compute each element of A to at least d decimal digits of accuracy, where d is the current setting of digits. [. . . ]

DISCLAIMER TO DOWNLOAD THE USER GUIDE THE MATHWORKS SYMBOLIC MATH TOOLBOX 5




Click on "Download the user Manual" at the end of this Contract if you accept its terms, the downloading of the manual THE MATHWORKS SYMBOLIC MATH TOOLBOX 5 will begin.

 

Copyright © 2015 - manualRetreiver - All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.