MATLAB Answers

How to generate a square wave with specif values

22 views (last 30 days)
Edoardo Demattei
Edoardo Demattei on 29 Jan 2021
Answered: VBBV on 30 Jan 2021
How to generate a square wave witch start from c0 and reaches c0+Vmax? Thanks for the support
N=1e5
Np=3
Fx=Np/N
n=(0:N-1)';
wt=2*pi*Fx*n;
c0=2
Vmax=5
phi1=pi/3
x_square=

Community Treasure Hunt

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

Start Hunting!