Mathematica Primer.nb 1

Size: px
Start display at page:

Download "Mathematica Primer.nb 1"

Transcription

1 Mathematica Primer.nb (* Mathematica is a powerful mathematics software pacage that can perform numerical calculations and SYMBOIC manipulations. To enter the program from either a Mac or Windows environment, open or double clic the Mathematica icon: After seeing colorful graphics, a prompt will appear. *) (* Note: parenthesis + asteris => comment field which is ignored during execution of statements. *) (* Mathematica can perform simple arithmetic. Add two numbers: type: <enter> or <shift><return> to execute: (<return> used for typing) *) (* Result displayed. Note comment field was ignored. *) (* We can also Subtract: *) 3-2 (* Divide: *) 5/3 5 (* and multiply: *) 33*8 264 (* Note: a space can replace the * when multiplying: *) (* Pi represents the number p, stored symbolically in Mathematica. The notation //N gives a 6-digit numerical approximation: *) Pi//N N[Pi,77] (* approximates p to 77 digits! N[f,# digits] => approximate f to # digits*) Ö Ö 3852

2 Mathematica Primer.nb 2 (* Special functions such as sine are denoted by a capital letter and a square bracet: *) Sin[Pi/2] (* Special functions are listed in the Appendix of the Mathematica reference text. *) (* We can define functions such as polynomials, which Mathematica can manipulate symbolically, just lie we do: *) F = a + b x + c x^2 + d x^3 a + b x + c x 2 + d x 3 (* Mathematica can also differentiate: *) F = D[F,x] b + 2 c x + 3 d x 2 (* Multiple derivatives: *) F3 = D[F, {x,3}] 6 d (* Partial derivatives: *) Fxc = D[F,x,c] 2 x (* Mathematica can solve indefinite integrals: *) Fintegral = Integrate[F,x] a x + b x2 ÅÅÅÅÅÅÅÅÅ 2 + ÅÅÅÅÅÅÅÅÅ c x3 3 + ÅÅÅÅÅÅÅÅÅ d x4 4 (* or definte integrals: *) Integrate[F, {x,,xmax}] b c d b xmax c xmax d xmax -a a xmax (* Graphs: suppose we let *) a = 3; b = ; c = ; d = ; (* Note the semicolon permits sequential execution needed in a program, but suppresses display of the result. *)

3 Mathematica Primer.nb 3 (* and then plot F over the domain - x 3 *) Plot[F, {x, -, 3}] (* We can remove the value assigned to a variable: *) a =.; (* and change the assignment: *) a = 30 Cos[Pi y^2]; (* Now let a = a(y) be a second variable for a 3D plot: *) Plot3D[F, {x, -, 3}, {y,, 4}] SurfaceGraphics- (* et's chec what is currently assigned to F: *) F x + x + x + 30 Cos[Pi y ]

4 Mathematica Primer.nb 4 (* We can plot more extensive functions: *) Plot[ Sum[2/(i*Pi)*(-^(i+))*Sin[i*Pi*x], {i,,0}], {x,0,}, Axesabel->{"x","y"}] y x (* We can expand expressions: *) Gp = Expand[(x+)^3] x + 3 x + x (* and evaluate the expression, for say x = 0: *) Gp/.x->0 (* or for x = r + s: *) Gp/.x->(r+s) (r + s) + 3 (r + s) + (r + s) (* We can simplify expressions, although Mathematica lacs intuition: *) Simplify[u^4*x + 4*u^3*x^2 + 6*u^2*x^3 + 4*u*x^4 + x^5 - u^4*z - 4*u^3*x*z - 6*u^2*x^2*z - 4*u*x^3*z - x^4*z] 4 (u + x) (x - z) (* Mathematica can perform matrix operations, and has the needed Do loops, If statements, Print, etc. that facilitate sequential programming: *) Q = Array[q, {4,4}]; (* defines a 4x4 array Q *) Do[ Q[[i,j]] = i^(j-), {i,,4},{j,,4}]; (* assigns values to array Q *) Q (* will display the array values row by row: *) {{,,, }, {, 2, 4, 8}, {, 3, 9, 27}, {, 4, 6, 64}}

5 Mathematica Primer.nb 5 (* Get a specific element *) Q[[2,4]] 8 (* We can define matrices directly, and even let elements be symbolic variables: *) A = {{ R/, 0, -Kxc/, 0}, { KeKh, -we, 0, 0}, { 0, Kf w^2/, -2 z w, -w^2 + Kxp Kf w^2/}, { 0, 0,, 0}} (* Note: column elements aligned for programmer recognition. *) 99 ÅÅÅÅ R Kxc Kf w2, 0, - ÅÅÅÅÅÅÅÅÅ, 0=, 8KeKh, -we, 0, 0<, 90, ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ, -2 w z, -w 2 Kf Kxp w2 + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ =, 80, 0,, 0<= (* Tae determinant *) DETA = Det[A] - R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ (* Multiply matrices, using period or. as the operator: *) A.Q Kxc R -3 Kxc R -9 Kxc R -27 Kxc R {{-(---) , , , }, {KeKh - we, KeKh - 2 we, KeKh - 4 we, KeKh - 8 we}, Kf w Kf Kxp w {-w w z, Kf w 2 Kf Kxp w (-w ) - 6 w z, Kf w 2 Kf Kxp w (-w ) - 8 w z, Kf w 2 Kf Kxp w (-w ) - 54 w z}, {, 3, 9, 27}} (* and vectors: *) Y = Q.{,2,3,4} {0, 49, 42, 33} (* Select a vector component *) Y[[3]] 42

6 Mathematica Primer.nb 6 (* and even tae the symbolic inverse! *) Inverse[A] 99 -w2 we + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Kf Kxp w2 we ÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ, 0, 0, - Kxc w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxc Kxp w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ =, - R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ 9 -KeKh w2 KeKh Kf Kxp w2 + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ, - R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ R w ÅÅÅÅÅÅÅÅÅÅ 2 Kf Kxp R w2 - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ, 0, KeKh Kxc w2 KeKh Kf Kxc Kxp w2 - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ KeKh Kf w 80, 0, 0, <, 9- ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ 2 ÅÅÅÅÅÅÅÅÅÅÅÅ I- R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ M, 2 Kf R w ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ I- R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ M, R we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅ I- R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ M, - 2 R w we z ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ == - R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅ + Kf Kxp R w2 we ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ KeKh Kf Kxc w 2 (* We can assign values to elements of A: *) R = 0.36; = ^-3; w = 29500; z = 0.26; = ^7; we = 02; e = ^-7; h = 5249; KeKh = e h; Kxc = 50; Kxp = 0.23; Kf = ^7; (* and then inspect the matrix. *) A//N {{54.76, 0, , 0}, { , -02., 0, 0}, 8 8 {0, , , }, {0, 0,., 0}} (* Mathematica can also get eigenvalues and eigenvectors: *) Eigensystem[A] ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ =, {{334.9, , I, I}, {{ , , , }, { , , , }, { I, I, I, I}, { I, I, I, I}}} (* Here I = Sqrt[-] is the base of imaginary numbers *)

7 Mathematica Primer.nb 7 (* Many special functions are available. Suppose we plot multiple curves on the same graph: *) Plot[ {BesselJ[0,x], BesselJ[,x]}, {x,0,0}] (* Parametric plots--plots where the absisca and ordinate depend on a third independent variable--permit Bode plots: *) (* Bode magnitude plot for *) n = 5; (* Butterworth filter: *) ParametricPlot[ {og[0,w],20 og[0,/sqrt[+w^(2 n)]]}, {w,0^-2,0^2},plotpoints->200,plotrange->all, AxesOrigin->{-2,0}]

8 Mathematica Primer.nb 8 (* Bode phase plot for same Butterworth filter: *) ParametricPlot[{og[0,w],-80/Pi (ArcTan[,w] + ArcTan[ - w^2, *w ] + ArcTan[ - w^2, *w ])}, {w,0^-2,0^2}, PlotPoints->200,PlotRange->All,AxesOrigin->{2,-450}] (* Mathematica can find roots of polynomials. Note that the double equal sign == denotes an equation, rather than an assignment: *) NSolve[ x^5 + 6 x^4 + x^3-2 x^2 + x - 5 == 0, x] {{x -> }, {x -> }, {x -> I}, {x -> I}, {x -> }} (* Roots of other transcendental equations: *) FindRoot[ {Sin[x] + 4 Cos[2 x] == y, 2 x == y}, {x, 0},{y,0}] {x -> , y ->.38332} (* Mathematica can generate closed form SYMBOIC solutions to simple (especially linear) differential equations: *) DSolve[ { x'[t] == - x[t] + z[t], z''[t] + 2 z'[t] + z[t] == Sin[2 t], (* differential equations *) x[0] == ao, z[0] == 6, z'[0] == -20 (* initial conditions, one is SYMBOIC *) }, {x[t], z[t]},t] (* Note: prime denotes derivative term(s). Time dependence in differential equations expressed as x[t] and z[t]. Unnowns are {x[t], z[t]}. *) 2 t t ao t t + 2 E Cos[2 t] - E Sin[2 t] {{x[t] -> , t 25 E t t t - 4 E Cos[2 t] - 3 E Sin[2 t] z[t] -> }} t 25 E

9 Mathematica Primer.nb 9 (* Mathematica can also generate numerical solutions to differential equations: *) X = NDSolve[ { x[]'[t] == -x[][t] + z[t], x[2]'[t] == x[][t] - x[2][t], z''[t] + 2 z'[t] + z[t] == Sin[2 t], (* differential equations *) x[][0] ==, x[2][0] == 0, z[0] == 6, z'[0] == -20 (* initial conditions *) }, {x[],x[2],z}, {t,0,}] (* Note: Prime denotes derivative term(s). Variable x is now a vector with two components x[] and x[2], with time dependence in differential equations expressed as x[][t] and x[2][t]. Solution for unnowns {x[],x[2],z} is stored in X. *) 88x@D Ø InterpolatingFunction@880.,.<<, <>D, x@2d Ø InterpolatingFunction@880.,.<<, <>D, z Ø InterpolatingFunction@880.,.<<, <>D<< Plot[ Evaluate[ x[][t]/.x ], {t,0,}] Ü Graphics Ü Plot[Evaluate[ x[2][t]/.x ], {t,0,}] Ü Graphics Ü

10 Mathematica Primer.nb 0 Plot[Evaluate[ z[t]/.x ], {t,0,}] Ü Graphics Ü H* Program for producing Bode Plots Transfer function: G Hs * G = 50 Hs - 4 ê HH0 s + Hs^2 + 4 s H-4 + s ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅ H + 0 s H8 + 4 s + s 2 Solve@Numerator@GD == 0, sd 88s Ø 4<< Solve@Denominator@GD == 0, sd 98s Ø -2-2 I<, 8s Ø I<, 9s Ø - ÅÅÅÅÅÅÅ 0 == Mag = Abs@G ê. Hs -> I wd; Phase = Arg@G ê. Hs -> I wd; ParametricPlot@88 og@0, wd, 20 og@0, MagD <, 8 og@0, wd, Phase 80 ê Pi <<, 8w, 0^H-3, 0^H3.5<, PlotRange -> All, PlotPoints -> 500, Plotabel -> "Magnitude HdB & Phase Hdegree", Axes -> None, Frame -> TrueD Magnitude HdB & Phase Hdegree Ü Graphics Ü

11 Mathematica Primer.nb (* Appendix: Mathematica program for calculating transfer function and determinants, for band pass filter circuit. *) (* System matrix *) A = { { 0, /, 0, 0, 0, 0}, {-/C, 0, -/C2, 0, 0, 0}, { 0, /, 0, -/2, 0, -/}, { 0, 0, /C2, 0, 0, 0}, { 0, 0, 0, 0, 0, /}, { 0, 0, /C2, 0, -/C,-Rload/}} 990, ÅÅÅÅÅÅÅ, 0, 0, 0, 0=, 9- ÅÅÅÅÅÅÅ C, 0, - ÅÅÅÅÅÅÅ C2 90, 0, ÅÅÅÅÅÅÅ, 0, 0, 0=, 90, 0, 0, 0, 0, ÅÅÅÅÅÅÅ C2 H* Calculate determinant * determinanta = Det@AD ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ C 2 C2 2 2 (* Input vector *) b = { 0, Ein, 0, 0, 0, 0} {0, Ein, 0, 0, 0, 0} (* Matrix: [si - A] *) As = s IdentityMatrix[6] - A, 0, 0, 0=, 90, ÅÅÅÅÅÅÅ =, 90, 0, ÅÅÅÅÅÅÅ {{s, -(--), - 0, 0, 0, 0}, {--, - s, --, - 0, 0, 0}, C C2 {0, -(--), - s, --, - 0, --}, - {0, 0, -(--), - s, 0, 0}, 2 C2 Rload {0, 0, 0, 0, s, -(--)}, - {0, 0, -(--), - 0, --, s}} C2 C, 0, - ÅÅÅÅÅÅÅ 2, 0, - ÅÅÅÅÅÅÅ =, C2, 0, - ÅÅÅÅÅÅÅ C, - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Rload == AT = Transpose[As]; (* Transpose As: exchange rows/columns *) AT[[6]] = b; (* Replace 6th column with b *) AT (* Inspect results *) {{s, --, - 0, 0, 0, 0}, {-(--), - s, -(--), - 0, 0, 0}, C {0, --, - s, -(--), - 0, -(--)}, - {0, 0, --, - s, 0, 0}, C2 C2 C2 2 {0, 0, 0, 0, s, --}, - {0, Ein, 0, 0, 0, 0}} C

12 Mathematica Primer.nb 2 (* Transfer function via Cramers rule *) Eout = Rload/ (Det[AT]/Det[As]) 2 3 (C Ein 2 Rload s ) / ( + C Rload s + 2 C s + 2 C 2 s + C2 2 s C Rload s + C 2 Rload s + C C2 2 Rload s C s + 2 C 2 s + 2 C C2 2 s C C2 2 Rload s + C C2 2 s ) G = Eout/Ein 2 3 (C 2 Rload s ) / ( + C Rload s + 2 C s + 2 C 2 s + C2 2 s C Rload s + C 2 Rload s + C C2 2 Rload s C s + 2 C 2 s + 2 C C2 2 s C C2 2 Rload s + C C2 2 s ) (* Transfer function via Matrix Inverse: all transfer functions calculated simultaneously. *) AInverse = Inverse[As].b; (* Calculate; A Inverse b *) Gi = (Rload/ AInverse[[6]])/Ein (* Display only G(s): *) 2 3 (C 2 Rload s ) / ( + C Rload s + 2 C s + 2 C 2 s + C2 2 s C Rload s + C 2 Rload s + C C2 2 Rload s C s + 2 C 2 s + 2 C C2 2 s C C2 2 Rload s + C C2 2 s ) (* Insert parameter values into transfer function: *) = 0^-3; 2 = 0^-3; C = 0^-6; C2 = 0^-6; Rload = 00; G//N (* Inspect transfer function *) -3 3 (. 0 s ) / ( s s s s s +. 0 s )

13 Mathematica Primer.nb 3 GPlot = (G/.s->(I w))//n -3 3 (-. 0 I w ) / ( I w w I w w I w -. 0 w ) (* Bode magnitude plot *) ParametricPlot[{og[0,w],20 og[0, Abs[GPlot]]}, {w,0^3,0^6}, PlotRange->All, PlotPoints->500, Plotabel->"Magnitude (db)", Axes->None, Frame->True] Magnitude (db) (* Bode phase plot *) ParametricPlot[{og[0,w],80/Pi Arg[GPlot]}, {w,0^3,0^6}, PlotRange->All, PlotPoints->500, Plotabel->"Phase (degrees)", Axes->None, Axesabel->{"w","Phase"}, Frame->True] Phase (degrees)

14 Mathematica Primer.nb 4 (* Bode magnitude & phase plot *) ParametricPlot[{{og[0,w],20 og[0, Abs[GPlot]]}, {og[0,w],80/pi Arg[GPlot]}}, {w,0^3,0^6}, PlotRange->All, PlotPoints->500, Plotabel->"Magnitude(dB) & Phase(degree)", Axes->None, Frame->True] Magnitude(dB) & Phase(degree) (* Insert parameter values into transfer function: *) =.; 2 =.; C = 0^-6; C2 = 0^-6; Rload = 00; G//N (* Inspect transfer function *) AT = Transpose[As]; (* Transpose As: exchange rows/columns *) AT[[2]] = b; (* Replace 6th column with b *) AT (* Inspect results *) {{s, , 0, 0, 0, 0}, {0, Ein, 0, 0, 0, 0}, {0, , s, , 0, }, {0, 0, 000, s, 0, 0}, {0, 0, 0, 0, s, }, {0, 0, 000, 0, -000, s}}

15 Mathematica Primer.nb 5 (* Transfer function for input impedance via Cramers rule *) λ = Simplify[ Ein/(Det[AT]/Det[As])]//N (0.00 ( s s s s s + s )) / (s ( s s s + s )) (* Other commands and examples can be found in Mathematica, A System for Doing Mathematics by Computer Steven Wolfram Addison-Wesley *)

Solving Schrödinger equation numerically

Solving Schrödinger equation numerically eigenvalues.nb Solving Schödinge equation numeically Basic idea on woking out the enegy eigenvalues numeically is vey simple. Just solve the Schödinge equation with a guessed enegy, and it always makes

More information

TU Bergakademie Freiberg. Computer Algebra System Mathematica

TU Bergakademie Freiberg. Computer Algebra System Mathematica TU Bergakademie Freiberg Winter 12/13 Computer Algebra System Mathematica 1 Introduction 1.1 About Mathematica Mathematica (www.wolfram.com/mathematica/) is one of the highest developed computer algebra

More information

The notebook interface is the usual one and is quite sophisticated. (It was used to create these notes, for instance.)

The notebook interface is the usual one and is quite sophisticated. (It was used to create these notes, for instance.) 4. Mathematica 4. Introduction Mathematica is a general purpose computer algebra system. That means it can do algebraic manipulations (including calculus and matrix manipulation) and it can also be used

More information

4. Mathematica. 4.1 Introduction. 4.2 Starting Mathematica Starting Mathematica from an X-terminal (Maths)

4. Mathematica. 4.1 Introduction. 4.2 Starting Mathematica Starting Mathematica from an X-terminal (Maths) 4. Mathematica 4.1 Introduction Mathematica is a general purpose computer algebra system. That means it can do algebraic manipulations (including calculus and matrix manipulation) and it can also be used

More information

Representations of Palindromic, Prime and Number Patterns

Representations of Palindromic, Prime and Number Patterns Representations of Palindromic, Prime and Number Patterns Inder J. Taneja 1 Abstract This work brings representations of palindromic and number patterns in terms of single letter a. Some examples of prime

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab Kristian Sandberg Department of Applied Mathematics University of Colorado Goal The goal with this worksheet is to give a brief introduction to the mathematical software Matlab.

More information

Beginner s Mathematica Tutorial

Beginner s Mathematica Tutorial Christopher Lum Autonomous Flight Systems Laboratory Updated: 12/09/05 Introduction Beginner s Mathematica Tutorial This document is designed to act as a tutorial for an individual who has had no prior

More information

This notebook "MathematicaDemo.nb" can be downloaded from the course web page.

This notebook MathematicaDemo.nb can be downloaded from the course web page. Mathematica demo http://www.wolfram.com/ This notebook "MathematicaDemo.nb" can be downloaded from the course web page. Basics Evaluate cells by pressing "shift-enter" / shift-return In[]:= + 3 Out[]=

More information

Mathematical Experiments with Mathematica

Mathematical Experiments with Mathematica Mathematical Experiments with Mathematica Instructor: Valentina Kiritchenko Classes: F 12:00-1:20 pm E-mail : vkiritchenko@yahoo.ca, vkiritch@hse.ru Office hours : Th 5:00-6:20 pm, F 3:30-5:00 pm 1. Syllabus

More information

FreeMat Tutorial. 3x + 4y 2z = 5 2x 5y + z = 8 x x + 3y = -1 xx

FreeMat Tutorial. 3x + 4y 2z = 5 2x 5y + z = 8 x x + 3y = -1 xx 1 of 9 FreeMat Tutorial FreeMat is a general purpose matrix calculator. It allows you to enter matrices and then perform operations on them in the same way you would write the operations on paper. This

More information

Agilent 3395 Integrator

Agilent 3395 Integrator Agilent 3395 Integrator Operating Manual Agilent Technologies Agilent 3395/3396 Integrators Manuals These manuals may contain references to HP or Hewlett-Packard. Please note that Hewlett-Packard s former

More information

2 Second Derivatives. As we have seen, a function f (x, y) of two variables has four different partial derivatives: f xx. f yx. f x y.

2 Second Derivatives. As we have seen, a function f (x, y) of two variables has four different partial derivatives: f xx. f yx. f x y. 2 Second Derivatives As we have seen, a function f (x, y) of two variables has four different partial derivatives: (x, y), (x, y), f yx (x, y), (x, y) It is convenient to gather all four of these into

More information

CurvesGraphics. A free package for Advanced Calculus illustrations. Gianluca Gorni. Arrows on 2D curves. Motivation

CurvesGraphics. A free package for Advanced Calculus illustrations. Gianluca Gorni. Arrows on 2D curves. Motivation CurvesGraphics A free package for Advanced Calculus illustrations. Gianluca Gorni Motivation As a teacher of Calculus and Mathematical Analysis at college and university level, I feel that Mathematica

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Introduction MATLAB is an interactive package for numerical analysis, matrix computation, control system design, and linear system analysis and design available on most CAEN platforms

More information

Introduction to Octave/Matlab. Deployment of Telecommunication Infrastructures

Introduction to Octave/Matlab. Deployment of Telecommunication Infrastructures Introduction to Octave/Matlab Deployment of Telecommunication Infrastructures 1 What is Octave? Software for numerical computations and graphics Particularly designed for matrix computations Solving equations,

More information

Ph3 Mathematica Homework: Week 6

Ph3 Mathematica Homework: Week 6 Ph3 Mathematica Homework: Week 6 Eric D. Black California Institute of Technology v1.1 Now that we ve covered techniques specific to data analysis, we will branch out into some more general topics. This

More information

Introduction to MATLAB

Introduction to MATLAB CHEE MATLAB Tutorial Introduction to MATLAB Introduction In this tutorial, you will learn how to enter matrices and perform some matrix operations using MATLAB. MATLAB is an interactive program for numerical

More information

Dynamical Systems - Math 3280 Mathematica: From Algebra to Dynamical Systems c

Dynamical Systems - Math 3280 Mathematica: From Algebra to Dynamical Systems c Dynamical Systems - Math 3280 Mathematica: From Algebra to Dynamical Systems c Edit your document (remove extras and errors, ensure the rest works correctly). If needed, add comments. It is not necessary

More information

Matlab and Octave: Quick Introduction and Examples 1 Basics

Matlab and Octave: Quick Introduction and Examples 1 Basics Matlab and Octave: Quick Introduction and Examples 1 Basics 1.1 Syntax and m-files There is a shell where commands can be written in. All commands must either be built-in commands, functions, names of

More information

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS STEPHEN WOLFRAM MATHEMATICADO OO Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS Table of Contents XXI a section new for Version 3 a section new for Version 4 a section substantially modified for

More information

Math 7 Elementary Linear Algebra PLOTS and ROTATIONS

Math 7 Elementary Linear Algebra PLOTS and ROTATIONS Spring 2007 PLOTTING LINE SEGMENTS Math 7 Elementary Linear Algebra PLOTS and ROTATIONS Example 1: Suppose you wish to use MatLab to plot a line segment connecting two points in the xy-plane. Recall that

More information

TUTORIAL 1 Introduction to Matrix Calculation using MATLAB TUTORIAL 1 INTRODUCTION TO MATRIX CALCULATION USING MATLAB

TUTORIAL 1 Introduction to Matrix Calculation using MATLAB TUTORIAL 1 INTRODUCTION TO MATRIX CALCULATION USING MATLAB INTRODUCTION TO MATRIX CALCULATION USING MATLAB Learning objectives Getting started with MATLAB and it s user interface Learn some of MATLAB s commands and syntaxes Get a simple introduction to use of

More information

Matlab Tutorial. Get familiar with MATLAB by using tutorials and demos found in MATLAB. You can click Start MATLAB Demos to start the help screen.

Matlab Tutorial. Get familiar with MATLAB by using tutorials and demos found in MATLAB. You can click Start MATLAB Demos to start the help screen. University of Illinois at Urbana-Champaign Department of Electrical and Computer Engineering ECE 298JA Fall 2015 Matlab Tutorial 1 Overview The goal of this tutorial is to help you get familiar with MATLAB

More information

Curves Dr Richard Kenderdine

Curves Dr Richard Kenderdine Curves Dr Richard Kenderdine Kenderdine Maths Tutoring 1 December 01 This note shows some interesting curves not usually encountered. Most of the examples exist as families that can be altered by changing

More information

University of Alberta

University of Alberta A Brief Introduction to MATLAB University of Alberta M.G. Lipsett 2008 MATLAB is an interactive program for numerical computation and data visualization, used extensively by engineers for analysis of systems.

More information

A Mathematica Tutorial

A Mathematica Tutorial A Mathematica Tutorial -3-8 This is a brief introduction to Mathematica, the symbolic mathematics program. This tutorial is generic, in the sense that you can use it no matter what kind of computer you

More information

Teaching Complex Analysis as a Lab- Type ( flipped ) Course with a Focus on Geometric Interpretations using Mathematica

Teaching Complex Analysis as a Lab- Type ( flipped ) Course with a Focus on Geometric Interpretations using Mathematica Teaching Complex Analysis as a Lab- Type ( flipped ) Course with a Focus on Geometric Interpretations using Mathematica Bill Kinney, Bethel University, St. Paul, MN 2 KinneyComplexAnalysisLabCourse.nb

More information

MATLAB Premier. Middle East Technical University Department of Mechanical Engineering ME 304 1/50

MATLAB Premier. Middle East Technical University Department of Mechanical Engineering ME 304 1/50 MATLAB Premier Middle East Technical University Department of Mechanical Engineering ME 304 1/50 Outline Introduction Basic Features of MATLAB Prompt Level and Basic Arithmetic Operations Scalars, Vectors,

More information

Mathematica CalcCenter

Mathematica CalcCenter Mathematica CalcCenter Basic features Wolfram Mathematica CalcCenter is based on Mathematica Professional and it is primarily designed for technical calculations. Information about this product can be

More information

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER BENC 2113 DENC ECADD 2532 ECADD LAB SESSION 6/7 LAB

More information

Integrating Equations of Motion in Mathematica

Integrating Equations of Motion in Mathematica MmaGuide-GLG.nb Integrating Equations of Motion in Mathematica Gary L. Gray Assistant Professor Engineering Science and Mechanics The Pennsylvania State University 227 Hammond Building University Park,

More information

CSI 32. Lecture 15. Chapter 11 Recursion Functional Recursion 11.4 Binary Search

CSI 32. Lecture 15. Chapter 11 Recursion Functional Recursion 11.4 Binary Search Lecture 15 Chapter 11 Recursion 11.3 Functional Recursion 11.4 Binary Search 11.3 Functional Recursion Functional recursion is a method of defining functions in which the function being defined is applied

More information

Summer 2009 REU: Introduction to Matlab

Summer 2009 REU: Introduction to Matlab Summer 2009 REU: Introduction to Matlab Moysey Brio & Paul Dostert June 29, 2009 1 / 19 Using Matlab for the First Time Click on Matlab icon (Windows) or type >> matlab & in the terminal in Linux. Many

More information

Basic Exercises about Mathematica

Basic Exercises about Mathematica Basic Exercises about Mathematica 1. Calculate with four decimal places. NB F. 2.23607 2.23607 Ë We can evaluate a cell by placing the cursor on it and pressing Shift+Enter (or Enter on the numeric key

More information

I. This material refers to mathematical methods designed for facilitating calculations in matrix

I. This material refers to mathematical methods designed for facilitating calculations in matrix A FEW CONSIDERATIONS REGARDING MATRICES operations. I. This material refers to mathematical methods designed for facilitating calculations in matri In this case, we know the operations of multiplying two

More information

What is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment

What is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment What is MATLAB? MATLAB PROGRAMMING Stands for MATrix LABoratory A software built around vectors and matrices A great tool for numerical computation of mathematical problems, such as Calculus Has powerful

More information

OUTLINES. Variable names in MATLAB. Matrices, Vectors and Scalar. Entering a vector Colon operator ( : ) Mathematical operations on vectors.

OUTLINES. Variable names in MATLAB. Matrices, Vectors and Scalar. Entering a vector Colon operator ( : ) Mathematical operations on vectors. 1 LECTURE 3 OUTLINES Variable names in MATLAB Examples Matrices, Vectors and Scalar Scalar Vectors Entering a vector Colon operator ( : ) Mathematical operations on vectors examples 2 VARIABLE NAMES IN

More information

Introduction to MATLAB Programming

Introduction to MATLAB Programming Introduction to MATLAB Programming Arun A. Balakrishnan Asst. Professor Dept. of AE&I, RSET Overview 1 Overview 2 Introduction 3 Getting Started 4 Basics of Programming Overview 1 Overview 2 Introduction

More information

Linear Methods of Applied Mathematics Classification of PDEs

Linear Methods of Applied Mathematics Classification of PDEs ch8.nb Linear Methods of Applied Mathematics Classification of PDEs (c) Copyright 000 by Evans M. Harrell II and James V. Herod. All rights reserved. Notes for the instructor. This contains calculations

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab Andreas C. Kapourani (Credit: Steve Renals & Iain Murray) 9 January 08 Introduction MATLAB is a programming language that grew out of the need to process matrices. It is used extensively

More information

MATLAB Tutorial. Mohammad Motamed 1. August 28, generates a 3 3 matrix.

MATLAB Tutorial. Mohammad Motamed 1. August 28, generates a 3 3 matrix. MATLAB Tutorial 1 1 Department of Mathematics and Statistics, The University of New Mexico, Albuquerque, NM 87131 August 28, 2016 Contents: 1. Scalars, Vectors, Matrices... 1 2. Built-in variables, functions,

More information

Mathematica Basics. Exponential Functions Exp[expression] Natural Logarithms (ln) Log[expression]

Mathematica Basics. Exponential Functions Exp[expression] Natural Logarithms (ln) Log[expression] Mathematica Basics To evaluate a Mathematica command, press [Shift]+[Enter]. Pay attention to spaces! Mathematica interprets some of them as multiplication. Syntax, capitalization and punctuation are meaningful.

More information

Laboratory 1 Octave Tutorial

Laboratory 1 Octave Tutorial Signals, Spectra and Signal Processing Laboratory 1 Octave Tutorial 1.1 Introduction The purpose of this lab 1 is to become familiar with the GNU Octave 2 software environment. 1.2 Octave Review All laboratory

More information

MATLAB QUICK START TUTORIAL

MATLAB QUICK START TUTORIAL MATLAB QUICK START TUTORIAL This tutorial is a brief introduction to MATLAB which is considered one of the most powerful languages of technical computing. In the following sections, the basic knowledge

More information

Computer Packet 1 Row Operations + Freemat

Computer Packet 1 Row Operations + Freemat Computer Packet 1 Row Operations + Freemat For this packet, you will use a website to do row operations, and then learn to use a general purpose matrix calculator called FreeMat. To reach the row operations

More information

A Mathematica Tutorial - 1. Basic Operations

A Mathematica Tutorial - 1. Basic Operations A Mathematica Tutorial -. Basic Operations This Tutorial was created usig Mathematica 6.0. Some of the cells described below can only be performed in version 6.0. Note that Mathematica can be used as a

More information

Table of Contents. Basis CEMTool 7 Tutorial

Table of Contents. Basis CEMTool 7 Tutorial PREFACE CEMTool (Computer-aided Engineering & Mathematics Tool) is a useful computational tool in science and engineering. No matter what you background be it physics, chemistry, math, or engineering it

More information

Calculus II - Math 1220 Mathematica Commands: From Basics To Calculus II - Version 11 c

Calculus II - Math 1220 Mathematica Commands: From Basics To Calculus II - Version 11 c Calculus II - Math 1220 Mathematica Commands: From Basics To Calculus II - Version 11 c Edit your document (remove extras and errors, ensure the rest works correctly) and turn-in your print-out. If needed,

More information

MATLAB Tutorial EE351M DSP. Created: Thursday Jan 25, 2007 Rayyan Jaber. Modified by: Kitaek Bae. Outline

MATLAB Tutorial EE351M DSP. Created: Thursday Jan 25, 2007 Rayyan Jaber. Modified by: Kitaek Bae. Outline MATLAB Tutorial EE351M DSP Created: Thursday Jan 25, 2007 Rayyan Jaber Modified by: Kitaek Bae Outline Part I: Introduction and Overview Part II: Matrix manipulations and common functions Part III: Plots

More information

2.0 MATLAB Fundamentals

2.0 MATLAB Fundamentals 2.0 MATLAB Fundamentals 2.1 INTRODUCTION MATLAB is a computer program for computing scientific and engineering problems that can be expressed in mathematical form. The name MATLAB stands for MATrix LABoratory,

More information

MATLAB Premier. Asst. Prof. Dr. Melik DÖLEN. Middle East Technical University Department of Mechanical Engineering 10/30/04 ME 304 1

MATLAB Premier. Asst. Prof. Dr. Melik DÖLEN. Middle East Technical University Department of Mechanical Engineering 10/30/04 ME 304 1 MATLAB Premier Asst. Prof. Dr. Melik DÖLEN Middle East Technical University Department of Mechanical Engineering 0/0/04 ME 04 Outline! Introduction! Basic Features of MATLAB! Prompt Level and Basic Aritmetic

More information

Introduction to Engineering gii

Introduction to Engineering gii 25.108 Introduction to Engineering gii Dr. Jay Weitzen Lecture Notes I: Introduction to Matlab from Gilat Book MATLAB - Lecture # 1 Starting with MATLAB / Chapter 1 Topics Covered: 1. Introduction. 2.

More information

16.06/16.07 Matlab/Simulink Tutorial

16.06/16.07 Matlab/Simulink Tutorial Massachusetts Institute of Technology 16.06/16.07 Matlab/Simulink Tutorial Version 1.0 September 2004 Theresa Robinson Nayden Kambouchev 1 Where to Find More Information There are many webpages which contain

More information

Variable Definition and Statement Suppression You can create your own variables, and assign them values using = >> a = a = 3.

Variable Definition and Statement Suppression You can create your own variables, and assign them values using = >> a = a = 3. MATLAB Introduction Accessing Matlab... Matlab Interface... The Basics... 2 Variable Definition and Statement Suppression... 2 Keyboard Shortcuts... More Common Functions... 4 Vectors and Matrices... 4

More information

Basic stuff -- assignments, arithmetic and functions

Basic stuff -- assignments, arithmetic and functions Basic stuff -- assignments, arithmetic and functions Most of the time, you will be using Maple as a kind of super-calculator. It is possible to write programs in Maple -- we will do this very occasionally,

More information

Matlab Introduction. Scalar Variables and Arithmetic Operators

Matlab Introduction. Scalar Variables and Arithmetic Operators Matlab Introduction Matlab is both a powerful computational environment and a programming language that easily handles matrix and complex arithmetic. It is a large software package that has many advanced

More information

Limits, Continuity, and Asymptotes

Limits, Continuity, and Asymptotes LimitsContinuity.nb 1 Limits, Continuity, and Asymptotes Limits Limit evaluation is a basic calculus tool that can be used in many different situations. We will develop a combined numerical, graphical,

More information

Getting Started with MATLAB

Getting Started with MATLAB APPENDIX B Getting Started with MATLAB MATLAB software is a computer program that provides the user with a convenient environment for many types of calculations in particular, those that are related to

More information

MATLAB/Octave Tutorial

MATLAB/Octave Tutorial University of Illinois at Urbana-Champaign Department of Electrical and Computer Engineering ECE 298JA Fall 2017 MATLAB/Octave Tutorial 1 Overview The goal of this tutorial is to help you get familiar

More information

GRAPHICAL REPRESENTATION OF SURFACES

GRAPHICAL REPRESENTATION OF SURFACES 9- Graphical representation of surfaces 1 9 GRAPHICAL REPRESENTATION OF SURFACES 9.1. Figures defined in Mathematica ô Graphics3D[ ] ø Spheres Sphere of centre 1, 1, 1 and radius 2 Clear "Global` " Graphics3D

More information

hp calculators hp 39g+ & hp 39g/40g Using Matrices How are matrices stored? How do I solve a system of equations? Quick and easy roots of a polynomial

hp calculators hp 39g+ & hp 39g/40g Using Matrices How are matrices stored? How do I solve a system of equations? Quick and easy roots of a polynomial hp calculators hp 39g+ Using Matrices Using Matrices The purpose of this section of the tutorial is to cover the essentials of matrix manipulation, particularly in solving simultaneous equations. How are

More information

Online Technology Guide for Elementary Linear Algebra, 6e Larson/Falvo

Online Technology Guide for Elementary Linear Algebra, 6e Larson/Falvo Online Technology Guide for Elementary Linear Algebra, e Larson/Falvo Computer Software Programs and Graphing Utilities Introduction to MATLAB............................................... Introduction

More information

Chapter 1 Introduction to MATLAB

Chapter 1 Introduction to MATLAB Chapter 1 Introduction to MATLAB 1.1 What is MATLAB? MATLAB = MATrix LABoratory, the language of technical computing, modeling and simulation, data analysis and processing, visualization and graphics,

More information

Introduction to Mathcad

Introduction to Mathcad CHAPTER 1 Introduction to Mathcad Mathcad is a product of MathSoft inc. The Mathcad can help us to calculate, graph, and communicate technical ideas. It lets us work with mathematical expressions using

More information

Part #1. A0B17MTB Matlab. Miloslav Čapek Filip Kozák, Viktor Adler, Pavel Valtr

Part #1. A0B17MTB Matlab. Miloslav Čapek Filip Kozák, Viktor Adler, Pavel Valtr A0B17MTB Matlab Part #1 Miloslav Čapek miloslav.capek@fel.cvut.cz Filip Kozák, Viktor Adler, Pavel Valtr Department of Electromagnetic Field B2-626, Prague You will learn Scalars, vectors, matrices (class

More information

Getting to Know Maple

Getting to Know Maple Maple Worksheets for rdinary Differential Equations Complimentary software to accompany the textbook: Differential Equations: Concepts, Methods, and Models (00-00 Edition) Leigh C. Becker Department of

More information

Excel and the solution of linear and non-linear simultaneous equations. Part 1

Excel and the solution of linear and non-linear simultaneous equations. Part 1 Comp Math/IT 2007-08 g.bowtell@city.ac.uk www.staff.city.ac.uk/g.bowtell 1 Worksheet 3 Weeks beginning 5 th November and 12 th November 2007 Excel and the solution of linear and non-linear simultaneous

More information

MATLAB COURSE FALL 2004 SESSION 1 GETTING STARTED. Christian Daude 1

MATLAB COURSE FALL 2004 SESSION 1 GETTING STARTED. Christian Daude 1 MATLAB COURSE FALL 2004 SESSION 1 GETTING STARTED Christian Daude 1 Introduction MATLAB is a software package designed to handle a broad range of mathematical needs one may encounter when doing scientific

More information

MATLAB Tutorial. 1. The MATLAB Windows. 2. The Command Windows. 3. Simple scalar or number operations

MATLAB Tutorial. 1. The MATLAB Windows. 2. The Command Windows. 3. Simple scalar or number operations MATLAB Tutorial The following tutorial has been compiled from several resources including the online Help menu of MATLAB. It contains a list of commands that will be directly helpful for understanding

More information

Dr Richard Greenaway

Dr Richard Greenaway SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 3 Creating, Organising & Processing Data Dr Richard Greenaway 3 Creating, Organising & Processing Data In this Workshop the matrix type is introduced

More information

Creates a 1 X 1 matrix (scalar) with a value of 1 in the column 1, row 1 position and prints the matrix aaa in the command window.

Creates a 1 X 1 matrix (scalar) with a value of 1 in the column 1, row 1 position and prints the matrix aaa in the command window. EE 350L: Signals and Transforms Lab Spring 2007 Lab #1 - Introduction to MATLAB Lab Handout Matlab Software: Matlab will be the analytical tool used in the signals lab. The laboratory has network licenses

More information

A Brief Introduction to MATLAB

A Brief Introduction to MATLAB A Brief Introduction to MATLAB MATLAB (Matrix Laboratory) is an interactive software system for numerical computations and graphics. As the name suggests, MATLAB was first designed for matrix computations:

More information

Making Holes and Windows in Surfaces

Making Holes and Windows in Surfaces The Mathematica Journal Making Holes and Windows in Surfaces Alan Horwitz In this article, we demonstrate makehole, a program which removes points from any Graphics or Graphics3D picture whose coordinates

More information

Chapter 1 MATLAB Preliminaries

Chapter 1 MATLAB Preliminaries Chapter 1 MATLAB Preliminaries 1.1 INTRODUCTION MATLAB (Matrix Laboratory) is a high-level technical computing environment developed by The Mathworks, Inc. for mathematical, scientific, and engineering

More information

Towards an Intuitive Understanding of Quaternion Rotations

Towards an Intuitive Understanding of Quaternion Rotations Towards an Intuitive Understanding of Quaternion Rotations James Jennings 4th draft February 6, 2008 Abstract: Although quaternions are generally deemed useful for representing three dimenional rotations

More information

Eric W. Hansen. The basic data type is a matrix This is the basic paradigm for computation with MATLAB, and the key to its power. Here s an example:

Eric W. Hansen. The basic data type is a matrix This is the basic paradigm for computation with MATLAB, and the key to its power. Here s an example: Using MATLAB for Stochastic Simulation. Eric W. Hansen. Matlab Basics Introduction MATLAB (MATrix LABoratory) is a software package designed for efficient, reliable numerical computing. Using MATLAB greatly

More information

CMAT Language - Language Reference Manual COMS 4115

CMAT Language - Language Reference Manual COMS 4115 CMAT Language - Language Reference Manual COMS 4115 Language Guru: Michael Berkowitz (meb2235) Project Manager: Frank Cabada (fc2452) System Architect: Marissa Ojeda (mgo2111) Tester: Daniel Rojas (dhr2119)

More information

Computer Programming in MATLAB

Computer Programming in MATLAB Computer Programming in MATLAB Prof. Dr. İrfan KAYMAZ Atatürk University Engineering Faculty Department of Mechanical Engineering What is a computer??? Computer is a device that computes, especially a

More information

Identity Matrix: >> eye(3) ans = Matrix of Ones: >> ones(2,3) ans =

Identity Matrix: >> eye(3) ans = Matrix of Ones: >> ones(2,3) ans = Very Basic MATLAB Peter J. Olver January, 2009 Matrices: Type your matrix as follows: Use space or, to separate entries, and ; or return after each row. >> [;5 0-3 6;; - 5 ] or >> [,5,6,-9;5,0,-3,6;7,8,5,0;-,,5,]

More information

An Introduction to MATLAB and the Control Systems toolbox Aravind Parchuri, Darren Hon and Albert Honein

An Introduction to MATLAB and the Control Systems toolbox Aravind Parchuri, Darren Hon and Albert Honein E205 Introduction to Control Design Techniques An Introduction to MATLAB and the Control Systems toolbox Aravind Parchuri, Darren Hon and Albert Honein MATLAB is essentially a programming interface that

More information

A very brief Matlab introduction

A very brief Matlab introduction A very brief Matlab introduction Siniša Krajnović January 24, 2006 This is a very brief introduction to Matlab and its purpose is only to introduce students of the CFD course into Matlab. After reading

More information

Introduction to Python Practical 1

Introduction to Python Practical 1 Introduction to Python Practical 1 Daniel Carrera & Brian Thorsbro October 2017 1 Introduction I believe that the best way to learn programming is hands on, and I tried to design this practical that way.

More information

1 Introduction to Matlab

1 Introduction to Matlab 1 Introduction to Matlab 1. What is Matlab? Matlab is a computer program designed to do mathematics. You might think of it as a super-calculator. That is, once Matlab has been started, you can enter computations,

More information

Can be put into the matrix form of Ax=b in this way:

Can be put into the matrix form of Ax=b in this way: Pre-Lab 0 Not for Grade! Getting Started with Matlab Introduction In EE311, a significant part of the class involves solving simultaneous equations. The most time efficient way to do this is through the

More information

Introduction to MATLAB Practical 1

Introduction to MATLAB Practical 1 Introduction to MATLAB Practical 1 Daniel Carrera November 2016 1 Introduction I believe that the best way to learn Matlab is hands on, and I tried to design this practical that way. I assume no prior

More information

Solve, RootOf, fsolve, isolve

Solve, RootOf, fsolve, isolve Solve, RootOf, fsolve, isolve Maple is capable of solving a huge class of equations: (the solution tells us that can be arbitrary). One may extract the solutions using the "[ ]" notation (we will learn

More information

Getting Started With Mathematica

Getting Started With Mathematica Getting Started With Mathematica First Steps This semester we will make use of the software package Mathematica; this package is available on all Loyola networked computers. You can access Mathematica

More information

EGR 111 Introduction to MATLAB

EGR 111 Introduction to MATLAB EGR 111 Introduction to MATLAB This lab introduces the MATLAB help facility, shows how MATLAB TM, which stands for MATrix LABoratory, can be used as an advanced calculator. This lab also introduces assignment

More information

An Introduction to Numerical Methods

An Introduction to Numerical Methods An Introduction to Numerical Methods Using MATLAB Khyruddin Akbar Ansari, Ph.D., P.E. Bonni Dichone, Ph.D. SDC P U B L I C AT I O N S Better Textbooks. Lower Prices. www.sdcpublications.com Powered by

More information

PC-MATLAB PRIMER. This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens.

PC-MATLAB PRIMER. This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens. PC-MATLAB PRIMER This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens. >> 2*3 ans = 6 PCMATLAB uses several lines for the answer, but I ve edited this to save space.

More information

(Creating Arrays & Matrices) Applied Linear Algebra in Geoscience Using MATLAB

(Creating Arrays & Matrices) Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB (Creating Arrays & Matrices) Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional

More information

MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix.

MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix. MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix. Row echelon form A matrix is said to be in the row echelon form if the leading entries shift to the

More information

Newton s Method. Example : Find the root of f (x) =

Newton s Method. Example : Find the root of f (x) = Newton s Method Example : Find the root of f (x) = If we draw the graph of f (x), we can see that the root of f (x) = 0 is the x - coordinate of the point where the curve intersects with the x - axis.

More information

Overview: The original Mathematica was a computer algebra system (CAS) released by Stephen Wolfram in 1988.

Overview: The original Mathematica was a computer algebra system (CAS) released by Stephen Wolfram in 1988. Mathematica 7.0.1 Overview: The original Mathematica was a computer algebra system (CAS) released by Stephen Wolfram in 1988. Modern releases have augmented the CAS with powerful numerical and graphical

More information

Dr Richard Greenaway

Dr Richard Greenaway SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 2 Basic MATLAB Operation Dr Richard Greenaway 2 Basic MATLAB Operation 2.1 Overview 2.1.1 The Command Line In this Workshop you will learn how

More information

Lecture 2: Variables, Vectors and Matrices in MATLAB

Lecture 2: Variables, Vectors and Matrices in MATLAB Lecture 2: Variables, Vectors and Matrices in MATLAB Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE201: Computer Applications. See Textbook Chapter 1 and Chapter 2. Variables

More information

CS184: Using Quaternions to Represent Rotation

CS184: Using Quaternions to Represent Rotation Page 1 of 5 CS 184 home page A note on these notes: These notes on quaternions were created as a resource for students taking CS184 at UC Berkeley. I am not doing any research related to quaternions and

More information

Curriculum Map: Mathematics

Curriculum Map: Mathematics Curriculum Map: Mathematics Course: Honors Advanced Precalculus and Trigonometry Grade(s): 11-12 Unit 1: Functions and Their Graphs This chapter will develop a more complete, thorough understanding of

More information

Getting Started With Mathematica

Getting Started With Mathematica Getting Started With Mathematica First Steps This semester we will make use of the software package Mathematica; this package is available on all Loyola networked computers. You can access Mathematica

More information