confused on how to code this
Mostrar comentarios más antiguos
(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 comentarios
David Hill
el 25 de Ag. de 2022
Show us your code and ask a specific question.
Brendan Jozwiak
el 25 de Ag. de 2022
Walter Roberson
el 25 de Ag. de 2022
sin(theta)^2
Chunru
el 26 de Ag. de 2022
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.
Respuestas (2)
Walter Roberson
el 25 de Ag. de 2022
Editada: Image Analyst
el 26 de Ag. de 2022
1 voto
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
el 26 de Ag. de 2022
Categorías
Más información sobre Cell Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
