Fitting data using a series of Sin and Cos

I have the following data representing the normal displacement caused by a normal load applied at the middle cross section of a cylinder:

I've made the data available here.

I am trying to fit using the function:

$$w=\sum_{i=1}^{n} A_{i}\cdot sin(j\theta)+B_{i}\cdot cos(j\theta)$$

where $A_{i}$ and $B_{i}$ are the unknown amplitudes to be found. I am using LeastSquares for this task:

theta = data[[All, 1]];
w = data[[All, 2]];

num = Dimensions[theta][[1]];
n = 5;

m = Table[
Flatten[Table[{Sin[i1*theta[[i2]]], 0}, {i1, 1, n}]] +
Flatten[Table[{0, Cos[i1*theta[[i2]]]}, {i1, 1, n}]], {i2, 1,
num}];
x = LeastSquares[m, w];

f[t_] := Total[Flatten[Table[{Sin[i*t], Cos[i*t]}, {i, 1, n}]].x]
Plot[f[t], {t, -Pi, Pi}, PlotRange -> {{-1, 1}, {0, 0.030}}]


But it is resulting in an empty graphic:

Does anyone know what I am doing wrong?

-
Your data is screwy - using exponentiation with e has no meaning to Mathematica. Format it correctly and if you still have problems, update the data link. –  rasher Mar 8 at 7:19

After patching your data and fixing/adjusting code (removed unneeded Total, upped samples):

theta = data[[All, 1]];
w = data[[All, 2]];

num = Dimensions[theta][[1]];
n = 150;

m = Table[
Flatten[Table[{Sin[i1*theta[[i2]]], 0}, {i1, 1, n}]] +
Flatten[Table[{0, Cos[i1*theta[[i2]]]}, {i1, 1, n}]], {i2, 1,
num}];
x = LeastSquares[m, w];

f[t_] := Flatten[Table[{Sin[i*t], Cos[i*t]}, {i, 1, n}]].x
Plot[f[t], {t, -Pi, Pi}, PlotRange -> {{-1, 1}, {0, 0.030}}]


-
thank you a lot! –  Saullo Castro Mar 8 at 7:47
And to make this fitting success, the index of fitted function should start from $i=0$ :) –  xzczd Mar 8 at 7:48
@xzczd thank you for this comment, indeed there are cases where the series must start with $i=0$ –  Saullo Castro Apr 7 at 7:08