Professional Documents
Culture Documents
Computational Lab Materials Basics MATLAB Class 1
Computational Lab Materials Basics MATLAB Class 1
Jadavpur University
Computational Laboratory
Code: PE/PC/B/S/223
Exp
Name of Experiment
No.
1 Formulate and solve the basic problems relating Matrices, Matrix Algebra,
Fourier Transform and acclimatize in use of Basic Graphics, Basic Data Analysis,
M-Files, Data Files, Log Scales, Curve Fitting in MATLAB.
2 Admittance Matrix Formulation using MATLAB
3 Power Flow Analysis using MATLAB
4 Economic Load Dispatch problem formulation and analysis using MATLAB
5 Heat Transfer problem formulation and analysis using ANSYS Fluent software
6 Computational Fluid Dynamics problem formulation and analysis using ANSYS
Fluent software
Course
Computational Lab Course Code PE/PC/B/S/223 Course Credit 1.5
Name
Semester II Year 2nd Stream PE
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
Computational Lab
CO1 2 3 2 1 1 1
CO2 1 2 1 2 3 1 2 1
CO3 1 2 2 2 3 1 1 1 1 2 1
CO4 2 2 3 2 1 1 1 1 2 2 1 1
Correlation between Course Outcomes (CO) and Program Specific Outcomes (PSO)
PSO1 PSO2 PSO3
Computational
CO1 2 2
Lab
CO2 1 1 1
CO3 2 1 2
CO4 2 1
Basics of
MATLAB
Content
1. First Steps in MATLAB
2. Typing into MATLAB
3. Matrices
4. Basic Graphics
5. More Matrix Algebra
6. Basic Data Analysis
7. Graphics of Functions of Two Variables
8. M-Files
9. Data Files
10.Directories
11.Startup
12.Using MATLAB on Different Platforms
13.Log Scales
14.Curve Fitting—Matrix Division
• MATLAB (MATrix LABoratory)(Developed by MATHWORKS) a software package
• MATLAB® - a high-level language and interactive environment for numerical computation, visualization,
and programming (language of technical computing).
• One can analyze data, develop algorithms, and create models and applications
• The language, tools, and built-in math functions enable you to explore multiple approaches and reach a
solution faster than with spreadsheets or traditional programming languages, such as C/C++ or Java®.
• One can use MATLAB for a range of applications, including signal processing and communications, image
and video processing, control systems, test and measurement, computational finance, and
computational biology.
Key Features
•High-level language for numerical computation, visualization, and application development
•Interactive environment for iterative exploration, design, and problem solving
•Mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization,
numerical integration, and solving ordinary differential equations
•Built-in graphics for visualizing data and tools for creating custom plots
•Development tools for improving code quality and maintainability and maximizing performance
•Tools for building applications with custom graphical interfaces
•Functions for integrating MATLAB based algorithms with external applications and languages such
as C, Java, .NET, and Microsoft® Excel®
1 First Steps in MATLAB
Spacing of operators in
formulas doesn’t affect
answer
1.3 Matrices
• The basic object that matlab deals with is a matrix.
• A matrix is an array of numbers.
column-vector
row-vector,
1 × 1 matrix, a scala
3 × 3 matrix
(2,3)
1.4 Variables
• Variables in matlab are named objects that are assigned using the equals sign = .
• Name length – maxi 63 characters
• A and a are different variables
The syntax x:y means roughly “generate the ordered set of numbers from x
to y with increment 1 between them.”
The syntax x:d:y means roughly “generate the ordered set of numbers from
x to y with increment d between them.
1.6 Linspace
To generate a vector of evenly spaced points between two end points, you can
use the function linspace(start, stop, npoints )
??
1.7 Plotting Vectors
3 Matrices
3.1 Typing Matrices
3.2 Matrices
Matrices can be made up of submatrices
C = vertcat(A1,...,AN)
C = cat(dim, A, B)
C = cat(dim, A1, A2, A3, A4, ...)