0% found this document useful (0 votes)
6 views

Sheet 1 Lab

This document is a MATLAB exercise sheet for first-year electrical engineering students, focusing on various MATLAB functionalities and commands. It includes tasks such as explaining the purpose of different MATLAB windows, using specific commands, performing calculations, and creating various types of matrices. The exercises aim to enhance students' practical skills in using MATLAB for electrical power and machines applications.

Uploaded by

gamalmoh143
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Sheet 1 Lab

This document is a MATLAB exercise sheet for first-year electrical engineering students, focusing on various MATLAB functionalities and commands. It includes tasks such as explaining the purpose of different MATLAB windows, using specific commands, performing calculations, and creating various types of matrices. The exercises aim to enhance students' practical skills in using MATLAB for electrical power and machines applications.

Uploaded by

gamalmoh143
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Electrical Engineering Department

Electrical Power and Machines Section


Electrical Testing 1B (MATLAB) [EPE121]
1st Year, 2nd Semester
SHEET (1)

(1) State the function of the following windows in MATLAB Program:-


a) Command window.
b) Work Space window.
c) Command History window.
(2) State the function of the following commands in MATLAB Program:-
a) clc d) help
b) clear e) doc
c) % f) ;
(3) How to find the results of the following expressions using MATLAB:-
a) √4 g) sin(30°)
b) 3! h) cos(45°)
c) e3 i) tan(60°)
d) ln(3) j) sin-1(1)
e) 105 k) cos-1(0)
f) │-2│ l) tan-1(1)
(4) Solve the following problem:-
Use MATLAB to set A equals to 3 (don’t output anything) and B equals to 4 (don’t output
anything) and set X equals to A times B (allow to display the output).
(5) If X=2, Y=5, a=1.12, b=2.34, c=0.72, d=0.81, and f=0.45, write the following equations
correctly using MATLAB:-

(6) Use MATLAB to compute the following complex numbers in polar & rectangular form:-

(7) Use MATLAB to create a 3×3 identity matrix.


(8) Use MATLAB to create a 4×4 matrix whose elements are all ones.
(9) Use MATLAB to create 3×3 diagonal matrix whose diagonal elements are 3, 7, 13.
(10) Use MATLAB to create a 5×5 matrix whose elements are generated by a uniformly
distributed pseudo-random number generator.
Good Luck
Electrical Engineering Department
Electrical Power and Machines Section
Electrical Testing 1B (MATLAB) [EPE121]
1st Year, 2nd Semester
SHEET (1)

(11) Use MATLAB to create a new matrix whose elements are the last two columns of the
matrix obtained in Problem 10 (i.e. remove the first three columns).
(12) From the given matrices A, B, and C find the following:-

i) Extract the second, third and fourth elements of the B vector and store them in
a new vector (say D)
ii) Create a new row vector (say E) from vector B and the number 3 such that
E=[397531]
iii) Create a new matrix (say F) from matrix A, vector C and the number 9 such that

(13) For the given matrices M, and N calculate the following:-

i) M+N ii) M-N iii) M*N

iv) M.*N v) M/N vi) M./N

vii) M\N
(14) From the matrix F in problem (12-iii), find the following:-
a) Extract the third column of the matrix F
b) Extract the last two elements of the matrix F
c) Convert the F matrix into a long column vector whose elements are the columns of the
matrix F stacked one by one under each other.
d) Flip the F matrix up, i.e. preserve the columns and flip the rows up.
e) Extract the lower triangular part of the matrix F.

Good Luck

You might also like