N = 15;
n = 1:2:2 * N;
dt = 0.01;
t = (-2:dt:2)';
T = 1;

%

bn = 2 ./ (n * pi)

%

wn = 2 * n * pi / T

%

y = sum(bn .* sin(wn .* t), 2)

%

plot(t, y)