0% found this document useful (0 votes)
28 views3 pages

FARWA Lab 1

The document discusses MATLAB commands for managing sessions, vectors, matrices and arrays. It covers basic operators and special characters in MATLAB as well as commands for matrix arithmetic and symbolic linear algebra functions.

Uploaded by

farwaaamelody
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)
28 views3 pages

FARWA Lab 1

The document discusses MATLAB commands for managing sessions, vectors, matrices and arrays. It covers basic operators and special characters in MATLAB as well as commands for matrix arithmetic and symbolic linear algebra functions.

Uploaded by

farwaaamelody
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
You are on page 1/ 3

FARWA KAMRAN

ELECTRICAL DEPARTMENT
SECTION B
LAB REPORT # 1
OF CIRCUIT ANALYSIS 2
BY SIR FAROOQ
# 22PWELE6015
Lab no 1 INTRODUCTION TO MATLAB
Introduction:
MATLAB, short for "Matrix Laboratory," is a high-level programming
language . It offers an extensive range of built-in functions that facilitate data
analysis, simulation, and algorithm development. MATLAB is very easy to use
that make it a preferred choice for engineers, scientists, and researchers
worldwide.

SOME COMMANDS IN MATLAB


Operators and Special Characters:
+ Plus; addition operator.
- Minus; subtraction operator.
Scalar and matrix multiplication operator.
.* Array multiplication operator.
^ Scalar and matrix exponentiation operator.
.^ Array exponentiation operator.
\ Left-division operator.
/ Right-division operator.
.\ Array left-division operator.
./ Array right-division operator.
: Colon; generates regularly spaced elements represent row or column.
() Parentheses; encloses function
[] Brackets; enclosures array elements.
. Decimal point.

Commands for Managing a Session:


Clc Clears Command window.
Clear Removes variables from memory.
exist Checks for existence of file or variable

Vector, Matrix and Array Commands:


Array Commands
linspace Creates regularly spaced vector.
logspace Creates logarithmically spaced vector.
Max Returns largest element.
Min Returns smallest element.
Reshape Change size
size Computes array size.
Sort Sorts each column.
Sum Sums each column.

Special Matrices:
eye Creates an identity matrix.
Ones Creates an array of ones.
zeros Creates an array of zeros.

Matrix Arithmetic:
cross Computes cross products.
dot Computes dot products.

Laplace Transform Functions:


ilaplace Returns the inverse Laplace transform.
laplace Returns the Laplace transform.

Symbolic Linear Algebra Functions:


Det Returns the determinant of a matrix.
eig Returns the eigenvalues (characteristic roots) of a matrix.
inv Returns the inverse of a matrix.
Poly Returns the characteristic polynomial of a matrix

You might also like