I am doing a school assignment, would like to get a help with the below:
1 次查看(过去 30 天)
显示 更早的评论
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.
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!