How to convert the points with respect to co-ordinate system?
4 ビュー (過去 30 日間)
古いコメントを表示
I have huge three 90*85 matrices with x,y,z values calculated from the left upper corner of the matrix. I would like to change the points with respect to new coordinate system.
How can I convert the points? Do you need more explanation?
2 件のコメント
Roger Stafford
2018 年 3 月 30 日
@Swapnil Rane: Yes, we do indeed need much more explanation. Aside from simply applying the conversion formulas from the current to the new coordinate systems for each triplet within the three respective matrices, what is it you are asking?
Also what is the significance of the phrase "calculated from the left upper corner"? What does it matter how these original values were calculated, with regard to the task of computing the necessary conversions?
採用された回答
Walter Roberson
2018 年 3 月 30 日
Usually you would create a transformation matrix, either 3 x 3 or 4 x 4, and you would take the three matrices and reshape them and concatenate them to create columns of a vector, and then use matrix multiplication by the transformation matrix. Take the N x 3 or N x 4 matrix that results and reshape the columns back to the original size of your input matrices.
4 件のコメント
Walter Roberson
2018 年 3 月 30 日
Just subtract off the location of the center from the coordinates.
x_center = mean(x(:));
y_center = mean(y(:));
z_center = mean(z(:));
newx = x - x_center;
newy = y - y_center;
newz = z - z_center;
その他の回答 (1 件)
Abhishek Ballaney
2018 年 3 月 30 日
https://in.mathworks.com/help/matlab/cartesian-coordinate-system-conversion.html
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!