Hi to all I am fine and hoping for the same. I want to take cos(theta) of the angle but for a = 1 and b = 1 angle should be 0 and for a = 1 and b = -1 it should be 180. The result should be in matrix form again. File attached.
Regards

 채택된 답변

Image Analyst
Image Analyst 2016년 5월 14일

0 개 추천

You do not multiply a and b by the cosine. You multiply a and b by pi and put it inside the cosine, cos(), OR multiply by 180 and put inside cosd(). See if that hint can help you. meshgrid() may also help.

댓글 수: 2

Offroad Jeep
Offroad Jeep 2016년 5월 14일
I have just assumed a and b as in the prg my concern is for a = 1 and b =1 the angle should be 0 and for a = 1 and b=-1 angle should be 180 or it can be pi
Image Analyst
Image Analyst 2016년 5월 14일
So? Just use b*pi and you're all set.

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

추가 답변 (0개)

질문:

2016년 5월 14일

댓글:

2016년 5월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by