title: Fill columns of a matrix with sin/cos without for loop
body: <p>Whenever I write a for loop I ask myself if there wouldn't be a more functional way to write it. I'm failing at coming up with something for this for loop, filling up columns of a matrix with sin/cos.</p>
  
  <pre><code>k = 5 #this is any odd integer
  t = np.arange(0,N)/fs #time array for the sin/cos
  
  A = np.zeros((N,k))
  A[:,0] = 1
  for i in range(1, k, 2):
      A[:,i] = np.cos(2*np.pi*freq*t*(i+1)/2)
      A[:,i+1] = np.sin(2*np.pi*freq*t*(i+1)/2)
  </code></pre>
  
  <p>I'm using numpy as this is used for more math afterwards. I realize there probably isn't any benefits in replacing the for loop as it's pretty trivial, but is there a way to replace this for loop?</p>