(a) Create a variable named theta. Assign an angle of to it.
Prove the trigonometric identity sin^2(theta)+cos^2(theta)=1
Here the is the variable ‘theta’ you created.
(b) Convert theta into degrees and store in a new variable theta_d and then repeat (a) to prove the trigonometric identity again. (Do not use function deg2rad).

댓글 수: 4

David Hill
David Hill 2022년 8월 25일
Show us your code and ask a specific question.
Brendan Jozwiak
Brendan Jozwiak 2022년 8월 25일
dont know how to fix this error and also in part B im unsure how to convert the the theta into degrees without using the function degree2rad
Walter Roberson
Walter Roberson 2022년 8월 25일
sin(theta)^2
Chunru
Chunru 2022년 8월 26일
theta = pi/2 instead of theta=angle(pi/2). Angle is a function to find the phase angle of a complex number. For a real number pi/2, the "angle" is 0.

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

답변 (2개)

Walter Roberson
Walter Roberson 2022년 8월 25일
편집: Image Analyst 2022년 8월 26일

1 개 추천

Use sin(theta)^2
360 degrees = 2π radians
divide by 2π
360/(2π) degrees = 1 radian
so x radians = 360/(2π) * x degrees
In matlab π is pi
Image Analyst
Image Analyst 2022년 8월 26일

0 개 추천

To convert theta into degrees
theta_d = theta * 180 / pi
To use trig functions on degrees, use the "d" version, for example sind instead of sin
sind(theta_d) ^ 2

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2022년 8월 25일

답변:

2022년 8월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by