This Code produce a symmetric quasi square wave. Any ideas to change the number of steps to 6, instead of 3.
To=0.02; %period
t=(0:To/500:To)';
f=sign(sin(2*pi*t/To))/2+sign(sin(-6*pi*t/To))/6;
plot(t,f7);grid on;
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!