# how to represent 30, 60, and 45 degree on matrix in Matlab?

18 ビュー (過去 30 日間)
Prerna Surbhi 2016 年 5 月 5 日

i want to represent 30 degree,60 degree and 90 degree on matlab? just like 45 degree is represented as
[-1,-1,2;-1,2,-1;2,-1,-1]
##### 3 件のコメント表示 2 件の古いコメント非表示 2 件の古いコメント
Walter Roberson 2016 年 5 月 5 日
How is that matrix being used? Is it, for example, the mask being used for conv2() ?

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

### 採用された回答

CS Researcher 2016 年 5 月 5 日
You should always give out as much information related to your question as you can. Help us to help you. I did not completely understand what you mean by representing angles in MATLAB. It is extremely vague. Do you mean rotation matrix? If yes, then it is given by (for a 3 x 3 case)
R = [ 1 0 0
0 cos(theta) sin(theta)
0 -sin(theta) cos(theta)]
The theta is in radians. How did you get the matrix that you have for 45 degrees?

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

### カテゴリ

Find more on Image Processing and Computer Vision in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by