









































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of various topics in matlab, including learning goals, matlab environment, scripts and functions, arithmetic operations, work session commands, special variables and constants, complex numbers, formatting, discrete math functions, arrays, polynomial roots, common math functions, printing, and diary function. It covers the basics of using matlab as a calculator, creating basic cartesian plots, writing and saving simple scripts, executing conditional statements and loop statements.
Typology: Slides
1 / 49
This page cannot be seen from the preview
Don't miss anything!










































>> 17 ans = 323*
>> 77/19 -4. ans = -0.
>> 64^(1/3) + 32^0. ans = 6
*>> (7+11)2. ans = 45
L = 14. L =
W = 13. W =
Area = LW Area = 191.*
Script & Function Files (m-files)
Script & Function Files (m-files)
Entering Commands & Expressions
**ans = 23
8 + (3*5) ans =
23
(8 + 3)* ans = 55**
**ans = 0
4^2128/(42) ans = 3*
**ans = 53
(34)^2 + 5 ans = 149*
**ans = 5
27^1/3 + 32^0. ans = 11**
clc (^) Clears the Command window clear (^) Removes all variables from memory clear v1 v2 Removes the variables v1 and v from memory exist(‘var’) (^) Determines if a file or variable exists having the name „var‟ quit (^) Stops MATLAB
who Lists the variables currently inmemory
whos
Lists the current variables and sizes, and indicates if they have imaginary parts. : (Colon) Generates an array having regularlyspaced elements , (Comma) (^) Separates elements of an array
; (Semicolon) Suppresses screen printing; alsodenotes a new row in an array
… (Ellipsis) (^) Continues a line
ans Temporary variable containing the mostrecent answer
eps Specifies the accuracy of floating pointprecision i,j (^) The imaginary unit (-1) Inf (^) Infinity (unbounded magnitude) NaN Indicates an undefined numerical result;a.k.a., N ot a N umber pi (^) The number pi (3.14159...) NaN returns the IEEE arithmetic representation for Not-a-Number (NaN). These result from operations which have undefined numerical results;. e.g., try Q = 0/
Im (i or j)
Re
F A Bi or F A Bj