Global coordintes to local (not on Matlab 2012!)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hey,
I have been searching for a way to be able to define spherical coordinates of the points in a XYZ matrix, based on a local coordinate system (new origin and xyz axes). All I have been running into is this new global2localcoord code in Matlab 2012 that the previous versions apparently don't have.
Could someone help me figure out how to do this?
0 comentarios
Respuesta aceptada
Jan
el 30 de En. de 2013
Editada: Jan
el 30 de En. de 2013
The general procedure is:
localCoor = rand(3, 100);
translationOfLocalOrigin = rand(3, 1);
rotationOfLocalCoorSystem = <DirectionCosinMatrix>; % [3 x 3] matrix
globalCoor = bsxfun(@minus, localCoor, translationOfLocalOrigin);
globalCoor = rotationOfLocalCoorSystem * globalCoor;
If you need more details, e.g. for the paraphrased "<DirectionCosinMatrix>", please post more details for your available input.
Más respuestas (0)
Ver también
Categorías
Más información sobre Motion Modeling and Coordinate Systems 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!