Preview

Symbolic Variables

Good Essays
Open Document
Open Document
1183 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Symbolic Variables
Symbolic Math in Matlab
Matlab has a powerful symbolic math ability. Rather than making calculations on known numbers, we can make calculations on symbolic expressions. For example, what is the limit as x approaches inf of 1 + 1/2^1 + 1/2^2 + 1/2^3...+1/2^n ? Matlab can tell us. What is the integral of x^3 for any x? Matlab can tell us.
Symbolic Math in Matlab
Matlab allows you to create symbolic math expressions. This is useful when you don't want to immediately compute an answer, or when you have a math "formula" to work on but don't know how to "process" it.
Matlab allows symbolic operations several areas including: * Calculus * Linear Algebra * Algebraic and Differential Equations * Transforms (Fourier, Laplace, etc)
The key function in Matlab to create a symbolic representation of data is: sym() or syms if you have multiple symbols to make.
Below is an example of creating some symbolic fractions and square roots:

>> sqrt(2) ans = 1.4142 >> sqrt( sym(2) ) ans = 2^(1/2) >> 2 / 5 ans = 0.4 >> 2/5 + 1/3 ans = 0.7333 >> sym(2) / sym(5) ans = 2/5 >> sym(2) / sym(5) + sym(1) / sym(3) ans = 11/15

Defining Symbolic Expressions
We can define symbolic functions using the sym command and syms command. Here is an example of creating a symbolic function for (a*X^2) + (b*x) + c: >> syms a b c x % define symbolic math variables >> f = sym('a*x^2 + b*x + c');

From now on we can use the f symbol to represent the given function.

Evaluation of Symbolic Expressions
The keyfunction subs (which stands for substitute) is used to replace symbolic variables with either new symbolic variables or with acutal values.

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Mat/206 week4

    • 302 Words
    • 2 Pages

    Numbers can get really large and hard to manage. For example 53000000*69000000 would end up as a huge number to be written out. Now if you write it as 5.3*10^7*6.9*10^7 makes it much simpler of a problem which the answer would be 3.657*10^14…

    • 302 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    PT1420week5exdkinney

    • 404 Words
    • 2 Pages

    VB supports many mathematical and/or numeric functions that can make calculations and other procedures very simple, as one just have to feed in the variables, and get the output after the function processes it. One such function is:…

    • 404 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Nt1330 Unit 9 Quiz

    • 1332 Words
    • 6 Pages

    Any problem that can be solved by building circuitry (AND, OR, NOT, XOR circuits) can also be solved by implementing the solution in a computer program.…

    • 1332 Words
    • 6 Pages
    Satisfactory Essays
  • Good Essays

    The aim of this guide is to teach you the basics of using a range of formulas in Microsoft Office Excel; this guide covers the following formulas: Addition; Subtraction, Multiplication, Division, Average & Percentage.…

    • 2823 Words
    • 12 Pages
    Good Essays
  • Powerful Essays

    Ap Calculus

    • 2722 Words
    • 11 Pages

    | The symbols +, -, *, /, %, and ^ used to denote addition, subtraction (or negation), multiplication, division, percentage, and exponentiation in an Excel formula.…

    • 2722 Words
    • 11 Pages
    Powerful Essays
  • Satisfactory Essays

    12. The STO→ button stores numbers to variables. To evaluate the expression23 4 a c b + −, press 9 STO→ ALPHA MATH ENTER to store the number 9 to A. Repeat this same process if B = 2 and C = 1, then evaluate the expression by…

    • 641 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Muscle Physiology

    • 593 Words
    • 6 Pages

    Refer to the appendix of this manual if you need a tutorial on how to make graphs in Microsoft Excel®.…

    • 593 Words
    • 6 Pages
    Satisfactory Essays
  • Good Essays

    Use of Raptor to add Input and Assignment symbols will allow user to input data when running the program. The Main and Input_Data modules will heavily use the Input and Assignment symbols in Raptor. In the Input_Data_module, variables will be assigned and declared. As well, the Main module will execute the entire program by calling the completed sub-charts.…

    • 761 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    I can provide excellent help for MathLab work. Guarantee 100% score for any homework , self check , study plan as well as final exam.…

    • 993 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Symbolic Analysts

    • 615 Words
    • 3 Pages

    for job growth will remain rather high. This is a result of two factors, a…

    • 615 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Excel is a powerful spreadsheet program that allows users to organize data, complete calculations, graph data,…

    • 492 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Made more advanced problems easier. It could graph equations and plot points that you put into its processors. A MUCH easier way to figure out complicated problems.…

    • 331 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Jobs That Require Math

    • 262 Words
    • 2 Pages

    One important job that requires math background is being a doctor. Physicians use math daily when they use statistics and probability for test results. Then there are forensic analysts. It’s their job to solve cases through analyzing fingerprints, dentistry, voice, speech, etc. Math is used in this job when the analysts use bloodstains to tell the story of the crime. The location where it lands and the shape of the blood reveal a lot to the analysts through them using math principles. Another job that involves math is a cryptanalyst. These people analyze and decipher secret codes. A lot of times, cryptanalysts have to do cryptic computations and use numerical analysis and theorems and postulates to solve the code.…

    • 262 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Nt1110 Unit 3 Assignment

    • 479 Words
    • 2 Pages

    Computer operating systems as far back as early Unix have included interactive calculator programs such as dc and hoc, and calculator functions are included in almost all PDA-type devices (save a few dedicated address book and dictionary devices).…

    • 479 Words
    • 2 Pages
    Powerful Essays
  • Good Essays

    Scientific Notation

    • 941 Words
    • 4 Pages

    * To multiply and divide numbers in scientific notation, just multiply or divide the coefficients, multiply the powers of ten (by the law of exponents), combine and change back into…

    • 941 Words
    • 4 Pages
    Good Essays