필터 지우기
필터 지우기

How can i use global2localcoord function with axes?

조회 수: 1 (최근 30일)
Faruk Öztürk
Faruk Öztürk 2019년 3월 2일
댓글: Faruk Öztürk 2019년 3월 4일
When i try to use global2localcoord function with local axes it gives unexpected (or wrong?) results.
For example, when i want local coordinates of [0;1;0] with local axes of [1 1 0;-1 1 0;0 0 1] at position [0;0;0]
global2localcoord([0;1;0],'rr',[0;0;0],[1,1,0;-1,1,0;0,0,1])
it gives the result "-0.7071 ; 0.7071 ; 0" but i think it should give "0.7071 ; 0.7071 ; 0"
i can get this result by changing the code to
global2localcoord([0;1;0],'rr',[0;0;0],[1,-1,0;1,1,0;0,0,1])
But what is the problem here? and what is the right way of using this function?

채택된 답변

Honglei Chen
Honglei Chen 2019년 3월 4일
From what you describe, your x axis is [1 1 0] and your y axis is [-1 1 0]. When yo specify the axes matrix, each colum represents an axis, therefore it should be [1 -1 0;1 1 0;0 0 1].
HTH

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by