Explanation of the code
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
what is the difference between cos and cosd in matlab
If alpha is angle A of the triangle. What does the following commands will do?
l=sind(alpha)*b;
d=cosd(alpha)*b;
Can anyone help me in understanding the code
Thanks in advance
댓글 수: 0
답변 (1개)
John Doe
2013년 5월 12일
편집: John Doe
2013년 5월 12일
The input to cosd and sind are in degrees, whereas it is in radians for cos and sin.
l = sind(alpha)*b; % the vertical leg
d = cosd(alpha)*b; % the horizontal leg
Given that b is the length of the hypotenuse, and that it is a right-angled triangle.
Hope it helped!
- Rob
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!