The function BSXFUN is one way to solve your problem, as illustrated by Amro. However, if you are a newer MATLAB user a simpler for-loop solution may be easier to understand and a little less intimidating:
w = 1; %# Choose the value of w
k = 1:20; %# Your 20 values to compute a sinusoid for
N = 100; %# The number of time points in each sinusoid
t = linspace(0,2*pi,N).'; %'# A column vector with N values from 0 to 2*pi
X = zeros(N,numel(k)); %# A matrix to store the sinusoids, one per column
for iLoop = 1:numel(k) %# Loop over all the values in k
X(:,iLoop) = sin(k(iLoop)*w*t)*(2/(pi*k(iLoop))); %# Compute the sinusoid
%# and add it to X
end
plot(t,X); %# Plot all the sinusoids in one call to plot
Here are some links to the documentation that should be helpful in fully understanding how the above solution works: LINSPACE, NUMEL, ZEROS, PLOT, For loops, Preallocating arrays to improve performance.