How to determine the sine Fourier coefficients of discrete data? The following relation gives me the measurements of interest $w$ at equally distanced locations $x_j$ in space:
$$w_j=\sum_{m=1}^{11}A_m\sin\left(\frac{mπx_j}{L}\right)$$
where $A_m$ are the Fourier coefficients of sine series and $L$ the total length is physical space. I also assume $m = 1,2,...,11$.
Now, how can I obtain the coefficients $A_m$ given the data $w_j$ ?
In accordance with the case of a continuous function $f(x)$ where
$$b_n=\frac{2}{L}\int_{0}^Lf(x)\sin\left(\frac{mπx}{L}\right)dx$$
I came with the following expression:
$$A_m=\frac{1}{N-1}\sum_{n=1}^{N}w_n\sin\left(\frac{mπx_n}{L}\right)$$
Can anyone confirm or not that solution?