That shows you the syntax . Now you have to find or write a function that implements dirac delta, and find or write a function that implements unit step function.
The Examples shown above can be used to plot the functions using stem.
Refer the documentation of Dirac-delta(Dirac)and unit-step(heaviside) they point to the MATLAB Built-in functions for the unit-step and Dirac-Delta Functions. You can use these Built-in functions to write your required expression and plot using stem.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
9 Comments
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020181
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020181
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020190
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020190
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020259
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020259
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020280
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020280
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020295
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020295
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020316
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020316
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020358
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1020358
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1021933
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1021933
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1021957
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/598198-how-to-plot-delta-dirac-and-unit-step-functions#comment_1021957
Sign in to comment.