Sei sulla pagina 1di 2

EXPERIMENT 1

AIM: Introduction to MATLAB and its usages.



- MATLAB is a high performance language for technical computing.
- It integrates computation, visualization and programming in an easy to use environment
where problems and solutions are expressed in familiar mathematical notations. It includes

o Math and Computation
o Algorithm development
o Data acquisition
o Modeling, simulation and prototyping
o Scientific and Engineering graphics
o Application development, including GUI building.

- The MATLAB system consists of five main parts:

1. Development Environment:
2. The MATLAB Mathematical Function Library:
3. The MATLAB Language:
4. Graphics:
5. The MATLAB Application Program Interface(API):


- There are the set of tools and facilities that help you use MATLAB functions and files. Many of
these tools are GUIs. It includes
MATLAB desktop
Command Window
Command history,
Editor
Debugger
Browsers for viewing help
Workspace, files, and the search path.

- There are vast collection of computational algorithms ranging from elementary functions like
sum, sin, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse,
matrix eigenvalues, Bessel Functions and fast Fourier Transforms.

Laboratory Assignment
1. From the command line, evaluate these expressions (a-d) using the following values, t=3.25,
x=4.5,y=6.97,z=1.03
( ) ( )
10
2
log
2
.) 4 3 10
.) 2
1 1
.)
.) 4 sin
y x
a M x y
b N e z
c O
x y t z
x
d P e
y
t
t

= + +
= +
= +
+ +
| |
=
|
\ .

2. Do as directed:
a. Create a vector X with a starting value of 0.0 and an ending value of 50, with increments of 0.1
between values
b. Create a vector Y with a starting value of 0.1 and an ending value of 50 and with the same
number of elements as in X. The elements must be evenly spaced.
3. Do as directed:
a. Using MATLAB commands create an array, labeled A, consisting of the first 10 prime numbers
listed in increasing order.
b. Using MATLAB commands on the array A to create the matrix B
13 17 19 23 29
13 11 7 5 3
B
(
=
(


4. Do as directed:
a. Use MATLAB commands to find the transpose of B, which you name C
b. Use MATLAB to Compute B*C and C*B.
5. Use a MATLAB command to create directly from matrix B, above, the matrices
| |
19
7
19 7
D
E
(
=
(

=

6. Verify Woodberry's Identity: ( )
( )
( )
1 1
1
1
1
1
A DEA
A DE A
EA D

+ =
+
for
5 2
3 1
A
(
=
(


7. Compute B*C, C *B and C.*C. Compare the result and comment on it.
8. Generate following using FOR loop:
E=[1,4,9,16,25,36,49,64,81,100]

Potrebbero piacerti anche