Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
0 of .
Results for:
P. 1
Experiment No.1 (DSP Lab)

# Experiment No.1 (DSP Lab)

Ratings:
(0)
|Views: 36|Likes:
Basics Of Matlab
Basics Of Matlab

### Availability:

See more
See less

03/29/2012

pdf

text

original

EXPERIMENT NO: 01
Introduction to MATLAB and its basiccommandsMATLAB
:
This is a very important tool used for making longcomplicated calculations and plotting graphs of differentfunctions depending upon our requirement. Using MATLABan m-file is created in which the basic operations areperformed which leads to simple short and simplecomputations of some very complicatedproblems in no or very short time.Some very important functions performed by MATLAB aregiven as follows:• Matrix computations• Vector Analysis• Differential Equations computations• Integration is possible• Computer language programming• Simulation• Graph Plotation• 2-D & 3-D Plotting
Benefits:
Some Benefits of MATLAB are given as follows:• Simple to use• Fast computations are possible• Wide working range• Solution of matrix of any order• Desired operations are performed in matrices• Different Programming languages can be used• Simulation is possible
Basic Commands:
Some basic MATLAB commands are given as follows:

:A+B
Subtraction
:A-B
Multiplication
:A*B
Division
:A/B
Power
:A^B
Power Of each Element individually
:A.^B
Range Specification
:A:B
Square-Root
:A=sqrt(B)Where A & B are any arbitrary integers
Basic Matrix Operations:
This is a demonstration of some aspects of the MATLABlanguage.
Creating a Vector
:Let’s create a simple vector with 9 elements called a.a = [1 2 3 4 6 4 3 4 5]a =1 2 3 4 6 4 3 4 5Now let's add 2 to each element of our vector, a, and storethe result in a new vector.Notice how MATLAB requires no special handling of vector ormatrix math.Adding an element to a Vector:b = a + 2b = 3 4 5 6 8 6 5 6 7
Plots and Graphs
:Creating graphs in MATLABis as easy as one command.Let's plot the result of ourvector addition with grid

lines.Plot (b)grid onMATLAB can make othergraph types as well, with axislabels.bar(b)xlabel('Sample #')ylabel('Pounds')MATLAB can use symbols in