0% found this document useful (0 votes)
14 views2 pages

MATLAB Lecture 1 Explained

This document provides an overview of Lecture 1 on Scientific Computing using MATLAB, covering fundamental concepts such as the MATLAB environment, basic arithmetic operations, and data structures like vectors and matrices. It also explains key features including variable storage, display formats, and built-in functions. The lecture serves as an introduction to using MATLAB for numerical and scientific computation.

Uploaded by

farookafrah09
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

MATLAB Lecture 1 Explained

This document provides an overview of Lecture 1 on Scientific Computing using MATLAB, covering fundamental concepts such as the MATLAB environment, basic arithmetic operations, and data structures like vectors and matrices. It also explains key features including variable storage, display formats, and built-in functions. The lecture serves as an introduction to using MATLAB for numerical and scientific computation.

Uploaded by

farookafrah09
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Scientific Computing Using MATLAB – Lecture 1

Introduction to MATLAB
This document explains all the concepts covered in Lecture 1 in a clear, simple, and exam-oriented
manner.
1. Introduction to Scientific Computing
Scientific computing deals with numerical methods used to solve mathematical problems such as
roots of equations, systems of equations, eigenvalues, and differential equations.
2. What is MATLAB?
MATLAB stands for Matrix Laboratory. It is a high-level programming language widely used for
numerical and scientific computation.
3. MATLAB Environment
The MATLAB interface consists of:
- Command Window
- Workspace
- Current Folder
4. MATLAB as a Calculator
MATLAB can perform basic arithmetic operations like addition, subtraction, multiplication, division,
and powers.
Example: 4^4 = 256
5. Automatic Variable Storage
The result of the last calculation is stored in the variable 'ans'.
6. Display Formats
format short – displays fewer digits
format long – displays up to 16 digits
7. Complex Numbers
Complex numbers are defined using i or j.
Example: z = 3 + 4i
8. Variables and Semicolon
Semicolon suppresses output display.
MATLAB is case-sensitive (a and A are different).
9. Vectors and Matrices
Row vector: x = [1 2 3 4]
Column vector: y = x'
Matrix: A = [1 2 3; 4 5 6; 7 8 9]
10. Transpose and Help Command
Transpose is obtained using apostrophe.
Help command provides syntax guidance.
11. Symmetric and Skew-Symmetric Matrices
A + A' gives symmetric matrix
A - A' gives skew-symmetric matrix
12. Identity Matrix
Identity matrix contains ones on diagonal.
13. who Command
Displays all variables in workspace.
14. Determinant, Inverse, and Eigenvalues
det(A) – determinant
inv(A) – inverse
eig(A) – eigenvalues
15. Vector Operations
Dot operator is used for component-wise operations.
Example: v1 .* v2
16. Matrix Operations
A * B – matrix multiplication
A .* B – element-wise multiplication
17. Built-in Functions
sin, cos, tan, sqrt are commonly used functions.
18. Strings
Strings are defined using quotes.
Characters can be accessed using indexing.
Conclusion
Lecture 1 introduces the basics of MATLAB required for scientific computing and numerical
analysis.

You might also like