Rotating a set of data so that the endpoints are at zero

89 Views Asked by At

I have a set of 2-D data in excel, an X and Y column. The X column ranges from ±200 and the Y column is a Gaussian distribution ranging from about 6.8 to 8. In total there are about 500 data points. I need to normalize the data so that the Y=0 at X=±200. I know this requires a coordinate transformation(rotation and/or linear) in order to maintain the shape/integrity of the curve but I'm really pretty foreign to that process. If anyone could point me in the direction of being able to do this either on paper or within excel or other software, I would really appreciate it. I have attached an image of what the plotted data currently looks like. Current non-normalized data.

The end points are now at about Y=6.7 and Y=6.8 for X=±200. Please let me know if you need any more information or pictures. Thanks!

1

There are 1 best solutions below

1
On

As I understand you want to find linear transformation to transform vectors $a_1= [ 200, \ 6.7]^T$, $b_1=[ -200, \ 6.8]^T$ into vectors $a_2=[200, \ 0]^T$, $b_2=[-200, \ 0]^T$ and next all curve.

You can do it first transforming these vectors to, for example, $a_3=[200, \ 200]^T$, $b_3=[-200, \ 200^T]$ and next to shift all transformed by transformation $M$ curve with the vector $[0,-200]^T$.

To make the first step you need to find such transformation $M$ that:

$\begin{bmatrix} 200 & -200\\ 200 & 200\ \end{bmatrix}=M \begin{bmatrix} 200 & -200 \\ 6.7 & 6.8 \\ \end{bmatrix}$ so you have $M=\begin{bmatrix} 200 & -200\\ 200 & 200\\ \end{bmatrix}\begin{bmatrix} 200 & -200 \\ 6.7 & 6.8 \\ \end{bmatrix}^{-1}$

After this step apply this transformation $M$ for all points of the curve i.e $p_r=Mp_c$ and finally shift vectors $p_r$ by vector $b=[0 -200]^T$ obtaining normalized points $p_n=p_r+b$.

Notice that it happens here matrix $\begin{bmatrix} 200 & -200 \\ 200 & 200 \\ \end{bmatrix}$ really is the matrix of rotation by $\pi/4$ scaled $\times \dfrac{200\times{2}}{\sqrt{2} } $ but you can use also other matrix for this goal.

If you need further adjustment of your curve without changing its now fixed endpoints $(-200,0), ( 200,0)$ use an additional transformation $S=\begin{bmatrix} 1 & 0 \\ 0 & k \\ \end{bmatrix}$ for adjusting $y$ values.

Finally notice that total transformation could not be isometric (i.e. consist only of rotation and translation) because distance between points $(-200,6.8),(200,6.7)$ is not the same as between $(-200,0),(200,0)$.