필터 지우기
필터 지우기

Rotating array with 20 degree

조회 수: 5 (최근 30일)
Abdulaziz
Abdulaziz 2013년 11월 17일
댓글: Abdulaziz 2013년 11월 18일
Dare all,
I have two equations (2 curves) where i need to rotate the coordinate of one of them with an angle of 20 clockwise. I am wondering if there is any way to do that by rotating array matrices with 20 degree and if yes how to do this.
I appreciate your help

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 11월 17일
편집: Azzi Abdelmalek 2013년 11월 17일
Look at this example
% -----initial curve---------
x=1:0.01:10;
y=sin(x);
plot(x,y,'r')
hold on
%---------rotated curve-----------------------
ang=20*pi/80 % rotation angle in rad
alpha=angle(x+i*y);
k=abs(x+i*y);
new_alpha=alpha+ang;
new_v=k.*exp(j*(new_alpha));
new_x=real(new_v);
new_y=imag(new_v);
plot(new_x,new_y)
  댓글 수: 1
Abdulaziz
Abdulaziz 2013년 11월 18일
Thank you Azzi That was very helpful

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by