%Lecture 11 periodic_rect.m
clear all;
clc;close all;
V0=2;
t=-30:0.1:30;
V=zeros(1,length(t));
T=6;
S=zeros(1,length(t));
for n=1:100
S=S+u(t-n*T)*(-1)^n;
end
V=V0*u(t)+S*V0*2;
figure;
plot(t,V)


