MATLAB ASSIGNMENT
Name : Paras
Roll No. : 25/B05/053
COURSE DESCRIPTION
Details of Course
Course code:Course Title Course Structure Pre-Requisite
MC106: MATLAB Programming L T P NIL
0 0 4
Course Objective: To objective of the course is to introduce
fundamentals of MATLAB programming and perform mathematical
operations in MATLAB.
Course outcomes(co):
CO1 Explain the basics and buil in function of MATLAB.
CO2 Describe mathematical operations on arrays in MATLAB.
CO3 Explain the working of relational and logical
operation,conditional statement and loops in MATLAB.
CO4 Construct and analyse different types of two dimentional
plots in MATLAB.
CO5 Solve polynomial and algebraic equation in MATLAB.
[Link] Experiment Page
no.
1 WAP for basic arithmetic operation with scalars. 4
2 WAP to demonstrate mathematical built in functions. 5-10
3 WAP to create 1-D and 2-D arrays in MATLAB further, add and delete 10-13
elements in the arrays
4 WAP to perform mathematical operations(addition, subtraction, arrays 14-15
multiplication, arrays division) on arrays in MATLAB.
5 Equations 16-18
6 Practical 19-27
6.1 Basic Matrix Operations 19
6.2 To Solve Linear Equation 23
6.3 Determine the eigen value and eigen vectors of a square matrix 23
6.4 Plots 24-27
7 WAP to demonstrate conditional statements and switch case in MATLAB 27
8 WAP to demonstrate loops in MATLAB. 27-28
9 WAP to construct plot using the plot command in MATLAB. 28-31
10 WAP to construct histograms in MATLAB. 31
11 WAP to solve polynomials and algebraic equations in MATLAB. 32-33
12 WAP to demonstrate differentiation and integration in Matlab. 33-34
Experiment 1: Wap for basic arithmetic
operation with scalars in MATLAB.
To perform operations, first we need to define the numbers.
Now, define the operations to perform
OUTPUT:
Workspace:
Experiment 2: WAP to demonstrate
mathematical built in functions in MATLAB.
OUTPUT:
Experiment 3: WAP to create 1-D and 2-D
arrays in MATLAB further, add and delete
elements in the arrays.
=>We create 1D vector using the following commands:
Output:
We can also create arrays by specifying starting,
spacing and ending or by using linspace:
Command window view:
Workspace:
=>To create 2D vectors, we use the following
commands:
Command window:
Workspace:
Performing operations on 1D Arrays:
Performing operations on 2D Arrays:
Command view: