필터 지우기
필터 지우기

Matrix transformstion need help

조회 수: 3 (최근 30일)
Ashes
Ashes 2013년 11월 3일
답변: Youssef Khmou 2013년 11월 3일
I want to do matrix transformation given that
R = [cos(theta), -sin(theta); sin(theta), cos(theta)];
with given
X = [3, -2,0,-2, 3]
and
Y = [0,1,0,-1,0, 0]
I wrote a script so that
R = [cos(theta), -sin(theta); sin(theta), cos(theta)];
X = [3, -2,0,-2, 3]
Y = [0,1,0,-1,0, 0];
plot(R, y);
xlabel('X');
ylabel('Y');
title('Test2d')
grid on

답변 (1개)

Youssef  Khmou
Youssef Khmou 2013년 11월 3일
Matrix transformation depends on size, if you are working on two dimensional space, then vectors X,Y must be 2x1 : here is an example :
X=[4 4];
Y=[-4 4]
ANGLE=acosd(dot(X,Y)./(norm(X)*norm(Y)))
R=[cosd(ANGLE) -sind(ANGLE);sind( ANGLE) -cosd(ANGLE)]
R*X' % it gives Y

카테고리

Help CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by