Clear Filters
Clear Filters

Generate square wave starting from 0

7 views (last 30 days)
I want to make square wave with function square which starts from 0 and not with amplitude

Accepted Answer

Walter Roberson
Walter Roberson on 11 Dec 2018
[zeroes(1,M), ones(1,N)] repeated as necessary .
  2 Comments
Walter Roberson
Walter Roberson on 12 Dec 2018
t = 0:.0001:.0625;
y = 1 - square(2*pi*30*t);
plot(t,y)

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!