You are on page 1of 19

Digital Signal Processing Lab

508518
MANAHIL ASHRAF
Name
180401047
Registration
Number
BE-EE-17B
Batch & Section

SANYA SIDDIQUE
Instructor’s Name

 OJECTIVE:
The aim of this lab is familiarized students with MATLAB basic so the upcoming lab will be more
understandable.

 TASK #01:
 PART A:

CODE:
RESULTS:

 PART B:

CODE:
RESULT:

EXECUTE V1(0):
the number of subscripts is 1 to N for N elements in the vector. By applying this V (0) is not executable
as MATLAB suggests the indices must be positive integers or logical values

EXECUTE V1(11)

As the number defined are from 1 to 10 so it is impossible to execute V1(11) as it is not in the range.

 PART C:

CODE:

RESULT:
 PART D:

CODE:

RESULT:

 PART E:

CODE:

RESULT:
 PART F:

CODE:

RESULT:

 PART G:

CODE:
RESULT:

 PART H:
 TASK #02:
 PART A:

 PART B:

 COMAPARE USAGE OF PART ‘A’ AND PART ‘B’:


 CLEAR ALL COMAND:
DIFFERENCE BETWEEN SCRIPT AND FUNCTIONS USAGE:

Scripts are m-files containing MATLAB statements. MATLAB ``functions'' are another type of


m-file. The biggest difference between scripts and functions is that functions have input
and output parameters. Script files can only operate on the variables that are hard-coded into
their m-file.

 CONCLUSION:
It is to conclude that at the end of this lab I am able to basic MATLAB function, solve arithmetic
problem and to create m file and able to understand the basic difference between scripts and

You might also like