필터 지우기
필터 지우기

Rotate n x m matrix

조회 수: 16 (최근 30일)
Yoeri
Yoeri 2014년 11월 4일
댓글: Makrim 2015년 5월 16일
I have a two vectors X and Y, lengths 768 and 556. Furthermore, I have a matrix D of 768x556 points, which is the actual data. The data is a measurement of the height of an area.
I would like to rotate the data-matrix D along the Z-axis of the XY-plot, about 10 degrees.
Up to now I have tried to do this by reshaping the matrix to an array and ajusting X and Y accordingly to get the correct lengths. Then I used a 3D rotation matrix around Z, but this does not really rotate the data, it only changes the dimensions of the axis.
Does anybody have a suggestion?

채택된 답변

Matt J
Matt J 2014년 11월 4일
편집: Matt J 2014년 11월 4일
If you have the Image Processing Toolbox,
imrotate(D,10)
  댓글 수: 2
Yoeri
Yoeri 2014년 11월 4일
Perfect! Especially using imrotate(D,10,'crop').
Thanks a million.
Makrim
Makrim 2015년 5월 16일
this will rotate arround the center of the matrix D !

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by