Rotating X & Y Data
37 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Tania
el 20 de Sept. de 2022
Comentada: Star Strider
el 27 de Sept. de 2022
Hello
I am trying to rotate GPS data, that has been con verted into X & Y coordintes to dsplay lengthwy along the Y axis strting at 0,0
I'm trying to rotate data in a 6135 x 15 table, where the data is layed out as follows 6135 data points of coordintes seperted into X & yXcolumns for each person.
Time I Person 1 x I Person 1 y I Person 2 x I Person 2 y I Person 3 x I Person 3 y .....etc
I would like to rotate this date to run length way along the Y axis. Each line represents data for a different person (7 in total):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1130460/image.png)
Is there a way to rotate a large table of X & Y coordinates.
Thank you in advance for your help!
0 comentarios
Respuesta aceptada
Más respuestas (1)
KSSV
el 20 de Sept. de 2022
p1 = rand(2,1) ;
p2 = rand(2,1) ;
%%rotation matrix
th = 90*pi/180 ;
R = [cos(th) -sin(th) ;sin(th) cos(th)] ;
%%rotate points
pr2 = R*p2 ;
figure
hold on
plot([p1(1) p2(1)],[p1(2) p2(2)] ,'r') ;
plot([p1(1) pr2(1)],[p1(2) pr2(2)] ,'b') ;
5 comentarios
Ver también
Categorías
Más información sobre Sensor Models en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!