Professional Documents
Culture Documents
Foundation and Fundamental Concepts
Foundation and Fundamental Concepts
Concepts
Help Features in MATLAB
• help function_name
• helpwin function_name
• doc function_name
• helpbrowser
General Purpose Commands
Managing Commands and Functions
help Display M-file for MATLAB functions
in the Command Window
helpwin Display M-file help and provide
access to M-file for all functions
doc Display HTML documentation in
Help Browser
Managing Variables and the Workspace
clear Remove items form the workspace
who,whos List the variables in the workspace
Controlling the Command Window
clc Clear Command Window
format Control the display format for output
Working with Files and the Operating
Environment
edit Edit an M-file
Mathematical Functions
Special Variables and Constants
ans, i, j, Inf, NaN, pi
Trigonometric Functions
sin, cos, tan, csc, sec, cot, asin, acos, atan,
acsc, asec, acot, sinh, cosh, tanh, csch, csch,
sech, coth
Exponential Functions
exp, log, log10, sqrt
Complex Function
abs, angle, conj, imag, real
Rounding and Remainder Function
fix, floor, ceil, round, mod, rem
Coordinate Transformation Function
cart2sph, cart2pol, pol2cart, sph2cart
Number Theoretic Function
primes, gcd, lcm, rat, rats
Scalar Arithmetic Operations
Symbol Operation
+ Addition
– Subtraction
* Multiplication
/ Right Division
\ Left Division
^ Exponentiation
Entering Commands and
Expressions
1 1 1 1 y ab
c 2
a b c d
4. Evaluate the following expressions in
MATLAB, for the values x = 5 + 8i,
y = – 6 + 7i.
a. u = x + y
b. v = xy
c. w = x / y
d. z = ex
e. r y
f. s = xy2