I am doing a school assignment, would like to get a help with the below:
2 views (last 30 days)
Show older comments
Siphenathi lewu
on 28 Jul 2017
Edited: per isakson
on 28 Jul 2017
We want to build in MatLab a realistic square generator function that will realize a square signal corresponding to a time vector t using a series of sine function with a given frequency f and with a given precision (order of the series) kmax. The mathematical formula of this object is: (see attached image)
- The prototype of the function will be: function y=SquareGenerator(t,f,kmax)
- If kmax is not defined a value of 20 will be used.
- If f is not defined a value of 1 will be used
- If t is not a vector (scalar or matrix) an error message will be displayed.
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Time Series Events in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!