My recreation in an Ipython session (having first tested your code in an Octave session):
In [649]: con = np.array([0.505868, 0.5235897])
In [650]: series = np.array([1,2,3])
In [651]: x = [np.ones((3,))]
In [652]: for j in range(2):
...: x.extend([np.cos(con[j]*series), np.sin(con[j]*series)])
...:
In [653]: x
Out[653]:
[array([ 1., 1., 1.]),
array([ 0.8747542 , 0.53038982, 0.05316725]),
array([ 0.48456691, 0.84775388, 0.99858562]),
array([ 8.66029942e-01, 5.00015719e-01, 2.72267949e-05]),
array([ 0.49999214, 0.86601633, 1. ])]
In [654]: np.array(x).T
Out[654]:
array([[ 1.00000000e+00, 8.74754200e-01, 4.84566909e-01,
8.66029942e-01, 4.99992140e-01],
[ 1.00000000e+00, 5.30389821e-01, 8.47753878e-01,
5.00015719e-01, 8.66016328e-01],
[ 1.00000000e+00, 5.31672464e-02, 9.98585622e-01,
2.72267949e-05, 1.00000000e+00]])
In MATLAB the
x = [x cos(...) sin(...)]
is closer to
x = np.concatenate([x, cos(...), sin(...)], axis=?)
but in numpy list append (or in this case extend) is faster. I just had to initial x to the appropriate list.
==================
I can get the same values without the loop
In [663]: y = con[:,None]*series
In [664]: [np.cos(y), np.sin(y)]
Out[664]:
[array([[ 8.74754200e-01, 5.30389821e-01, 5.31672464e-02],
[ 8.66029942e-01, 5.00015719e-01, 2.72267949e-05]]),
array([[ 0.48456691, 0.84775388, 0.99858562],
[ 0.49999214, 0.86601633, 1. ]])]
but it's a bit of a pain to rearrange them into the order produced by iteration, [1, cos, sin, cos, sin].