SlideShare a Scribd company logo
MMU/MATLABACADEMY/TASKS
Compiled by:
Martin Wachiye Wafula
BSc. Telecommunication and Information Engineering
Multimedia University of Kenya
E-mail: wachiyem@gmail.com Page 1
MULTIMEDIA UNIVERSITY OF KENYA
FACULTY OF ENGINEERING AND TECHNOLGY
MATLAB ACADEMY
Program Coordinator: DR. C. O. ADIKA, PhD
C.O.D MECHANICAL & MECHATRONICS
ENGINEERING DEPARTMENT
MATLAB TASKS
A. Generating AM Signals with MATLAB
The generation of AM signals using MATLAB is done by solving the following task.
Problem:
Open the MATLAB” M-file editor” and write a script (M-file) consisting of the commands
answering the following steps. Call the M-file “AMmod.m”. Use A = 1, m(t) = cos(wct), and
wc = 3ws, where ws is the cut-off frequency of the input signal.
1. Define a time vector t starting from −10, ending by 10 in steps of 0.01.
2. Generate the input signal s(t) = cos(wst) with ws = 2π.
3. Create a figure showing s(t) vs. t. Limit the axis as follows:
a) x-axis: -5 to 5 and
b) y-axis: -2 to 2.
Use the command help axis to get information how to do axis limitation with MATLAB.
4. Create a second figure. Subdivide it into 2 subplots (type help subplot to get help).
5. Plot the output signal xAM(t) for mAM = 0.75 in the first subplot. Plot the envelopes of
xAM(t) into the same subplot. Use different colors.
6. Plot the output signal xAM(t) for mAM = 1.75 in the second subplot. Plot the envelopes of
xAM(t) into the same subplot. Use different colors.
B. Plotting
a) Plot two sine functions with frequency f1 = 200 Hz and f2 = 50 Hz and amplitudes A1 = 1 V
and A2 = 1.5 V within the time interval t=[0,50] ms in the same figure. Use the sampling
period T = 10μs.
b) Sampling of ’continuous’ waveform
Given is the MATLAB routine ‘[s]=waveform(t)’ which generates the periodical signal s(t)
with period T = 20 ms. It is sampled in the time interval t= [0,65]ms with four different
sampling frequencies f1 = 100Hz, f2 = 250Hz, f3 = 500Hz and f4 = 1000Hz. Display
MMU/MATLABACADEMY/TASKS
Compiled by:
Martin Wachiye Wafula
BSc. Telecommunication and Information Engineering
Multimedia University of Kenya
E-mail: wachiyem@gmail.com Page 2
in four subfigures, the ’continuous’ waveform and the corresponding sampled
waveform, respectively. Use for the sampled waveform the command ’stem’. Moreover,
consider following properties of the figures:
General FontName of subplots: ’Times’
General FontSize of subplots: 8
x/y-Label: Time (in s) / Amplitude (in V)
FontName of labels: ’Times’
FontSize of labels: 11
Linestyle/-color/-width of ’continuous’ waveform: dotted / RGB= [0.4,0.9,0.3] / 2
Linestyle/-color/-width of sampled waveforms: solid,’.’ / blue / 1
Axis scaling: x=[0,65]*1e-3, y=[-1.1,1.1]
Legend: ’continuous’, ’sampled’
Grid: on
c) Simple 3D-Plots
Plot a two-dimensional Gaussian probability density function fx,y(x, y) with zero mean
and variance 1 within the range x ∈ [−5, 5], y ∈ [−5, 5]:
Try out the commands mesh, surf and contour to plot the graph!
NB:
• mesh(X,Y,Z,C):
plots the colored parametric mesh defined by four matrix arguments. The view
point is specified by view. The axis labels are determined by the range of X, Y and
Z, or by the current setting of axis. The color scaling is determined by the range
of C, or by the current setting of caxis. The scaled color values are used as indices
into the current colormap.
• surf(X,Y,Z,C):
is the same as mesh. The shading model is set by shading.
• surfl(X,Y,Z,C):
is the same as surf(...) except that it draws the surface with highlights from a
light source.
• contour(Z):
is a contour plot of matrix Z treating the values in Z as heights above a plane. A
MMU/MATLABACADEMY/TASKS
Compiled by:
Martin Wachiye Wafula
BSc. Telecommunication and Information Engineering
Multimedia University of Kenya
E-mail: wachiyem@gmail.com Page 3
contour plot are the level curves of Z for some values V. The values V are chosen
automatically. contour(X,Y,Z): X and Y specify the (x,y) coordinates of the surface
as for surf.
d) Voltage signal defined by
where U0 = 1.5V, f0 = 10kHz, Tv = 10T0, and T0 = 1/f0. The normalization of the
signal is done step by step:
1. Determine the period T0 of the sinusoidal part sin(2_f0t) of u(t).
2. Determine the length Tv of the voltage signal u(t).
3. Sketch u(t) as a function of t with all significant values on abscissa and ordinate.
4. Plot u(t) within the time interval [tl = −0.5ms, tu = 1.5ms] using MATLAB.

More Related Content

What's hot

DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
Amr E. Mohamed
 
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
Amr E. Mohamed
 
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
Amr E. Mohamed
 
Multirate dtsp
Multirate dtspMultirate dtsp
Multirate dtsp
Anjali Yadav
 
Sampling theorem
Sampling theoremSampling theorem
Sampling theorem
Shanu Bhuvana
 
The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)
Oka Danil
 
Overview of sampling
Overview of samplingOverview of sampling
Overview of sampling
Sagar Kumar
 
Dft,fft,windowing
Dft,fft,windowingDft,fft,windowing
Dft,fft,windowing
Abhishek Verma
 
Aliasing and Antialiasing filter
Aliasing and Antialiasing filterAliasing and Antialiasing filter
Aliasing and Antialiasing filter
Suresh Mohta
 
Digital Signal Processing[ECEG-3171]-Ch1_L05
Digital Signal Processing[ECEG-3171]-Ch1_L05Digital Signal Processing[ECEG-3171]-Ch1_L05
Digital Signal Processing[ECEG-3171]-Ch1_L05
Rediet Moges
 
Fft ppt
Fft pptFft ppt
Fft ppt
Puneet Gupta
 
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoidFourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoidXavier Davias
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
Amr E. Mohamed
 
DSP 08 _ Sheet Eight
DSP 08 _ Sheet EightDSP 08 _ Sheet Eight
DSP 08 _ Sheet Eight
Amr E. Mohamed
 
Fast fourier transform
Fast fourier transformFast fourier transform
Fast fourier transform
Ashraf Khan
 
DSP_FOEHU - Lec 03 - Sampling of Continuous Time Signals
DSP_FOEHU - Lec 03 - Sampling of Continuous Time SignalsDSP_FOEHU - Lec 03 - Sampling of Continuous Time Signals
DSP_FOEHU - Lec 03 - Sampling of Continuous Time Signals
Amr E. Mohamed
 
DSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier TransformDSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier Transform
Amr E. Mohamed
 
Fft analysis
Fft analysisFft analysis
Fft analysis
AldinoAldo
 
Digital Signal Processing[ECEG-3171]-Ch1_L06
Digital Signal Processing[ECEG-3171]-Ch1_L06Digital Signal Processing[ECEG-3171]-Ch1_L06
Digital Signal Processing[ECEG-3171]-Ch1_L06
Rediet Moges
 

What's hot (20)

DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
 
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
 
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
 
Multirate dtsp
Multirate dtspMultirate dtsp
Multirate dtsp
 
Sampling theorem
Sampling theoremSampling theorem
Sampling theorem
 
The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)
 
Overview of sampling
Overview of samplingOverview of sampling
Overview of sampling
 
Dft,fft,windowing
Dft,fft,windowingDft,fft,windowing
Dft,fft,windowing
 
Aliasing and Antialiasing filter
Aliasing and Antialiasing filterAliasing and Antialiasing filter
Aliasing and Antialiasing filter
 
Fft
FftFft
Fft
 
Digital Signal Processing[ECEG-3171]-Ch1_L05
Digital Signal Processing[ECEG-3171]-Ch1_L05Digital Signal Processing[ECEG-3171]-Ch1_L05
Digital Signal Processing[ECEG-3171]-Ch1_L05
 
Fft ppt
Fft pptFft ppt
Fft ppt
 
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoidFourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
DSP 08 _ Sheet Eight
DSP 08 _ Sheet EightDSP 08 _ Sheet Eight
DSP 08 _ Sheet Eight
 
Fast fourier transform
Fast fourier transformFast fourier transform
Fast fourier transform
 
DSP_FOEHU - Lec 03 - Sampling of Continuous Time Signals
DSP_FOEHU - Lec 03 - Sampling of Continuous Time SignalsDSP_FOEHU - Lec 03 - Sampling of Continuous Time Signals
DSP_FOEHU - Lec 03 - Sampling of Continuous Time Signals
 
DSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier TransformDSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier Transform
 
Fft analysis
Fft analysisFft analysis
Fft analysis
 
Digital Signal Processing[ECEG-3171]-Ch1_L06
Digital Signal Processing[ECEG-3171]-Ch1_L06Digital Signal Processing[ECEG-3171]-Ch1_L06
Digital Signal Processing[ECEG-3171]-Ch1_L06
 

Similar to Matlab task1

Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual
Amairullah Khan Lodhi
 
Signals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchSignals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 Batch
Amairullah Khan Lodhi
 
Dsp file
Dsp fileDsp file
Dsp file
Rakesh Thakur
 
BS LAB Manual (1).pdf
BS LAB Manual  (1).pdfBS LAB Manual  (1).pdf
BS LAB Manual (1).pdf
ssuser476810
 
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
Loren Schwappach
 
signal and system
signal and system signal and system
signal and system
SAURAV DAYAL SING
 
Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01
Sagar Gore
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
UR11EC098
 
Matlab solved tutorials 2017 june.
Matlab solved tutorials  2017 june.Matlab solved tutorials  2017 june.
Matlab solved tutorials 2017 june.
musadoto
 
ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018
ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018
ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018
musadoto
 
Digital communication lab lectures
Digital communication lab  lecturesDigital communication lab  lectures
Digital communication lab lectures
marwaeng
 
Dsp lab manual
Dsp lab manualDsp lab manual
Dsp lab manual
Mukul Mohal
 
ENG3104 Engineering Simulations and Computations Semester 2, 2.docx
ENG3104 Engineering Simulations and Computations Semester 2, 2.docxENG3104 Engineering Simulations and Computations Semester 2, 2.docx
ENG3104 Engineering Simulations and Computations Semester 2, 2.docx
YASHU40
 
dsp.pdf
dsp.pdfdsp.pdf
dsp.pdf
Naol Worku
 
International journal of applied sciences and innovation vol 2015 - no 1 - ...
International journal of applied sciences and innovation   vol 2015 - no 1 - ...International journal of applied sciences and innovation   vol 2015 - no 1 - ...
International journal of applied sciences and innovation vol 2015 - no 1 - ...
sophiabelthome
 
Lab manual
Lab manualLab manual
Lab manual
Mat Awang
 
Laboratory 7
Laboratory 7Laboratory 7
Laboratory 7
Shafiul Omam
 
4tocontest
4tocontest4tocontest
4tocontestberthin
 

Similar to Matlab task1 (20)

Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual
 
Signals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchSignals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 Batch
 
Dsp file
Dsp fileDsp file
Dsp file
 
BS LAB Manual (1).pdf
BS LAB Manual  (1).pdfBS LAB Manual  (1).pdf
BS LAB Manual (1).pdf
 
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
 
Laboratorio vibra
Laboratorio vibraLaboratorio vibra
Laboratorio vibra
 
signal and system
signal and system signal and system
signal and system
 
Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
 
Matlab solved tutorials 2017 june.
Matlab solved tutorials  2017 june.Matlab solved tutorials  2017 june.
Matlab solved tutorials 2017 june.
 
ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018
ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018
ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018
 
Etienne_ME_a241ms
Etienne_ME_a241msEtienne_ME_a241ms
Etienne_ME_a241ms
 
Digital communication lab lectures
Digital communication lab  lecturesDigital communication lab  lectures
Digital communication lab lectures
 
Dsp lab manual
Dsp lab manualDsp lab manual
Dsp lab manual
 
ENG3104 Engineering Simulations and Computations Semester 2, 2.docx
ENG3104 Engineering Simulations and Computations Semester 2, 2.docxENG3104 Engineering Simulations and Computations Semester 2, 2.docx
ENG3104 Engineering Simulations and Computations Semester 2, 2.docx
 
dsp.pdf
dsp.pdfdsp.pdf
dsp.pdf
 
International journal of applied sciences and innovation vol 2015 - no 1 - ...
International journal of applied sciences and innovation   vol 2015 - no 1 - ...International journal of applied sciences and innovation   vol 2015 - no 1 - ...
International journal of applied sciences and innovation vol 2015 - no 1 - ...
 
Lab manual
Lab manualLab manual
Lab manual
 
Laboratory 7
Laboratory 7Laboratory 7
Laboratory 7
 
4tocontest
4tocontest4tocontest
4tocontest
 

More from Martin Wachiye Wafula

Introduction to information theory
Introduction to information theoryIntroduction to information theory
Introduction to information theory
Martin Wachiye Wafula
 
Intelligent reflecting surfaces (IRS)
Intelligent reflecting surfaces  (IRS)Intelligent reflecting surfaces  (IRS)
Intelligent reflecting surfaces (IRS)
Martin Wachiye Wafula
 
ELECTRONIC MANAGEMENT SYSTEM BASED ON RFID AND USSD
ELECTRONIC MANAGEMENT SYSTEM BASED ON RFID AND USSDELECTRONIC MANAGEMENT SYSTEM BASED ON RFID AND USSD
ELECTRONIC MANAGEMENT SYSTEM BASED ON RFID AND USSD
Martin Wachiye Wafula
 
Disruptive technologies and market place
Disruptive technologies and market placeDisruptive technologies and market place
Disruptive technologies and market place
Martin Wachiye Wafula
 
5G: LET'S DEMYSTIFY IT, 5G Technology Update
5G: LET'S DEMYSTIFY IT, 5G Technology Update5G: LET'S DEMYSTIFY IT, 5G Technology Update
5G: LET'S DEMYSTIFY IT, 5G Technology Update
Martin Wachiye Wafula
 
Analog filters matlab_examples
Analog filters matlab_examplesAnalog filters matlab_examples
Analog filters matlab_examples
Martin Wachiye Wafula
 
Matlab problems
Matlab problemsMatlab problems
Matlab problems
Martin Wachiye Wafula
 
Discrete time signals on MATLAB
Discrete time signals on MATLABDiscrete time signals on MATLAB
Discrete time signals on MATLAB
Martin Wachiye Wafula
 
Discrete time signals on MATLAB
Discrete time signals on MATLABDiscrete time signals on MATLAB
Discrete time signals on MATLAB
Martin Wachiye Wafula
 
Unity in diversity
Unity in diversityUnity in diversity
Unity in diversity
Martin Wachiye Wafula
 

More from Martin Wachiye Wafula (10)

Introduction to information theory
Introduction to information theoryIntroduction to information theory
Introduction to information theory
 
Intelligent reflecting surfaces (IRS)
Intelligent reflecting surfaces  (IRS)Intelligent reflecting surfaces  (IRS)
Intelligent reflecting surfaces (IRS)
 
ELECTRONIC MANAGEMENT SYSTEM BASED ON RFID AND USSD
ELECTRONIC MANAGEMENT SYSTEM BASED ON RFID AND USSDELECTRONIC MANAGEMENT SYSTEM BASED ON RFID AND USSD
ELECTRONIC MANAGEMENT SYSTEM BASED ON RFID AND USSD
 
Disruptive technologies and market place
Disruptive technologies and market placeDisruptive technologies and market place
Disruptive technologies and market place
 
5G: LET'S DEMYSTIFY IT, 5G Technology Update
5G: LET'S DEMYSTIFY IT, 5G Technology Update5G: LET'S DEMYSTIFY IT, 5G Technology Update
5G: LET'S DEMYSTIFY IT, 5G Technology Update
 
Analog filters matlab_examples
Analog filters matlab_examplesAnalog filters matlab_examples
Analog filters matlab_examples
 
Matlab problems
Matlab problemsMatlab problems
Matlab problems
 
Discrete time signals on MATLAB
Discrete time signals on MATLABDiscrete time signals on MATLAB
Discrete time signals on MATLAB
 
Discrete time signals on MATLAB
Discrete time signals on MATLABDiscrete time signals on MATLAB
Discrete time signals on MATLAB
 
Unity in diversity
Unity in diversityUnity in diversity
Unity in diversity
 

Recently uploaded

Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 

Recently uploaded (20)

Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 

Matlab task1

  • 1. MMU/MATLABACADEMY/TASKS Compiled by: Martin Wachiye Wafula BSc. Telecommunication and Information Engineering Multimedia University of Kenya E-mail: wachiyem@gmail.com Page 1 MULTIMEDIA UNIVERSITY OF KENYA FACULTY OF ENGINEERING AND TECHNOLGY MATLAB ACADEMY Program Coordinator: DR. C. O. ADIKA, PhD C.O.D MECHANICAL & MECHATRONICS ENGINEERING DEPARTMENT MATLAB TASKS A. Generating AM Signals with MATLAB The generation of AM signals using MATLAB is done by solving the following task. Problem: Open the MATLAB” M-file editor” and write a script (M-file) consisting of the commands answering the following steps. Call the M-file “AMmod.m”. Use A = 1, m(t) = cos(wct), and wc = 3ws, where ws is the cut-off frequency of the input signal. 1. Define a time vector t starting from −10, ending by 10 in steps of 0.01. 2. Generate the input signal s(t) = cos(wst) with ws = 2π. 3. Create a figure showing s(t) vs. t. Limit the axis as follows: a) x-axis: -5 to 5 and b) y-axis: -2 to 2. Use the command help axis to get information how to do axis limitation with MATLAB. 4. Create a second figure. Subdivide it into 2 subplots (type help subplot to get help). 5. Plot the output signal xAM(t) for mAM = 0.75 in the first subplot. Plot the envelopes of xAM(t) into the same subplot. Use different colors. 6. Plot the output signal xAM(t) for mAM = 1.75 in the second subplot. Plot the envelopes of xAM(t) into the same subplot. Use different colors. B. Plotting a) Plot two sine functions with frequency f1 = 200 Hz and f2 = 50 Hz and amplitudes A1 = 1 V and A2 = 1.5 V within the time interval t=[0,50] ms in the same figure. Use the sampling period T = 10μs. b) Sampling of ’continuous’ waveform Given is the MATLAB routine ‘[s]=waveform(t)’ which generates the periodical signal s(t) with period T = 20 ms. It is sampled in the time interval t= [0,65]ms with four different sampling frequencies f1 = 100Hz, f2 = 250Hz, f3 = 500Hz and f4 = 1000Hz. Display
  • 2. MMU/MATLABACADEMY/TASKS Compiled by: Martin Wachiye Wafula BSc. Telecommunication and Information Engineering Multimedia University of Kenya E-mail: wachiyem@gmail.com Page 2 in four subfigures, the ’continuous’ waveform and the corresponding sampled waveform, respectively. Use for the sampled waveform the command ’stem’. Moreover, consider following properties of the figures: General FontName of subplots: ’Times’ General FontSize of subplots: 8 x/y-Label: Time (in s) / Amplitude (in V) FontName of labels: ’Times’ FontSize of labels: 11 Linestyle/-color/-width of ’continuous’ waveform: dotted / RGB= [0.4,0.9,0.3] / 2 Linestyle/-color/-width of sampled waveforms: solid,’.’ / blue / 1 Axis scaling: x=[0,65]*1e-3, y=[-1.1,1.1] Legend: ’continuous’, ’sampled’ Grid: on c) Simple 3D-Plots Plot a two-dimensional Gaussian probability density function fx,y(x, y) with zero mean and variance 1 within the range x ∈ [−5, 5], y ∈ [−5, 5]: Try out the commands mesh, surf and contour to plot the graph! NB: • mesh(X,Y,Z,C): plots the colored parametric mesh defined by four matrix arguments. The view point is specified by view. The axis labels are determined by the range of X, Y and Z, or by the current setting of axis. The color scaling is determined by the range of C, or by the current setting of caxis. The scaled color values are used as indices into the current colormap. • surf(X,Y,Z,C): is the same as mesh. The shading model is set by shading. • surfl(X,Y,Z,C): is the same as surf(...) except that it draws the surface with highlights from a light source. • contour(Z): is a contour plot of matrix Z treating the values in Z as heights above a plane. A
  • 3. MMU/MATLABACADEMY/TASKS Compiled by: Martin Wachiye Wafula BSc. Telecommunication and Information Engineering Multimedia University of Kenya E-mail: wachiyem@gmail.com Page 3 contour plot are the level curves of Z for some values V. The values V are chosen automatically. contour(X,Y,Z): X and Y specify the (x,y) coordinates of the surface as for surf. d) Voltage signal defined by where U0 = 1.5V, f0 = 10kHz, Tv = 10T0, and T0 = 1/f0. The normalization of the signal is done step by step: 1. Determine the period T0 of the sinusoidal part sin(2_f0t) of u(t). 2. Determine the length Tv of the voltage signal u(t). 3. Sketch u(t) as a function of t with all significant values on abscissa and ordinate. 4. Plot u(t) within the time interval [tl = −0.5ms, tu = 1.5ms] using MATLAB.