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.

采纳的回答

Rafael Hernandez-Walls
编辑:per isakson 2017-7-28

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by