Rotate Values of Matrix

1 回表示 (過去 30 日間)
Masoud Abbaszadeh
Masoud Abbaszadeh 2021 年 9 月 14 日
編集済み: Matt J 2021 年 9 月 14 日
Dear all,
I have a set of data (Xdata [401*401], Zdata [401*401] and Zdata [401*401]). Xdata in x-direction, Ydata in y-direction and Zdata is values which is shoun by color. This is actually Goldak heat source which is used in welding. As you see in the figure, the axis of heat source is in y-direction. How can I change/rotate the data of Zdata in a way that the axis is located in red line?
Thanks for your helps
Masoud

回答 (1 件)

Matt J
Matt J 2021 年 9 月 14 日
Use imtranslate() to center the source in the image, then use imrotate() it by the desired angle, then use imtranslate() once more to put it back in its original position.
  5 件のコメント
Masoud Abbaszadeh
Masoud Abbaszadeh 2021 年 9 月 14 日
It did not solve my problem Matt
Matt J
Matt J 2021 年 9 月 14 日
編集済み: Matt J 2021 年 9 月 14 日
I suggest attaching your data variables in one .mat file so that the community can play with it.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by