Question

4. (12 points) Derad2deg(C) (all values in D are in degree) a. Determine sin(D), cos(D), tan(D) b. Determine sin(D)+cos (D) [hints: sin(D).A2+cos(D).2] c. Determine sin (D), cos (D) and tan (D) Use Matlab and please explain how you got the answers. Write the exact codes.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

% get user input

C = input('Enter angle in radians : ');

% convert degree to radian using deg2rad() function

D = rad2deg(C);

fprintf('\nAngle D : %f\n', D);

% part (a)

% sin() function returns the value of sine

% these functions take angle in radians

fprintf('sin(D) : %f\n', sin(C));

% cos() function returns the value of cosine

% these functions take angle in radians

fprintf('cos(D) : %f\n', cos(C));

% tan() function returns the value of tangent

% these functions take angle in radians

fprintf('tan(D) : %f\n', tan(C));

% part(b)

% sin() function returns the value of sine

% cos() function returns the value of cosine

% these functions take angle in radians

val = sin(C) ^ 2 + cos(C) ^ 2;

fprintf('sin(D)^2 + cos(D)^2 : %f\n', val);

% part (c)

% Caution : the range of sin and co are [ -1 , 1 ]

% So, if D is not in range, it will cause error

% asin() function returns the value of inverse of sine

fprintf('sin(D)^-1 : %f\n', asin(D));

% cos() function returns the value of inverse of cosine

fprintf('cos(D)^-1 : %f\n', acos(D));

% tan() function returns the value of inverse of tangent

fprintf('tan(D)^-1 : %f\n', atan(D));

Sample Output

Angle D : 0.114592
sin(D) : 0.002000
cos(D) : 0.999998
tan(D) : 0.002000
sin(D)^2 + cos(D)^2 : 1.000000
sin(D)^-1 : 0.114844
cos(D)^-1 : 1.455952
tan(D)^-1 : 0.114094

Add a comment
Know the answer?
Add Answer to:
Use Matlab and please explain how you got the answers. Write the exact codes. 4. (12...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • run III please write the codes and do exactly what they asked runIV plot by HAND...

    run III please write the codes and do exactly what they asked runIV plot by HAND and use MATLAB also -will get tumbs up RUNWIN Use Matlab to solve the following non-linear equation: sin(w. ) - cos (w. ), for tan(w. ) sin(w. ) +12 for /2 RUNWIV I + + 2 Obtain plots by hand and by using Matlab of the following equation: (D) sin( +90°) vs. radians, degrees and time

  • just need 1 and 3, please use matlab codes Exercise 6 (if not specific mentioned, answers...

    just need 1 and 3, please use matlab codes Exercise 6 (if not specific mentioned, answers should be in 4 decimals or simplified; highlight your final answer by color 1. Find the approximate concavity measurement (2nd derivative) of the function at x =2. f(x) = sin( ) 2. Find the answers of following functions: a) ** by 10910(4x + 1) Vsin(x) + tan(x) 3. a) Declare the function f(x) = 4x + 5(x - 1.5)2 symbolicly. b) Find the minimum...

  • 5 4 If tan = and coto= find the exact value of sin(0-0). 9 Note: Be...

    5 4 If tan = and coto= find the exact value of sin(0-0). 9 Note: Be sure to enter EXACT values 1 You do not need to simplify any radicals. sin(0-0)- 2 If cosa = 0.369 and cos B 0.195 with both angles' terminal rays in Quadrant-l, find the values of (a) sin(a +B) = (b) sin(B-a) = Your answers should be accurate to 4 decimal places. Give exact answers 2 sin(a) = and cos(B) 4 5 Both angles terminate...

  • Please answer ALL parts of this question and clearly explain how you got to the answers....

    Please answer ALL parts of this question and clearly explain how you got to the answers. Thank you! 21 1.- Determine the value of n and Azrequired for Simpson's rule to approximatel 4+2 to within 10-5 and compute the approximation. How will the values of n and Ac change if we have used the Trapezoidal rule instead of Simpson's rule in question 1?

  • QUESTION 4 Use trig identity to determine the exact value of the following expressions. Provide all...

    QUESTION 4 Use trig identity to determine the exact value of the following expressions. Provide all steps solutions on submitted paper. 2 12-√2 √2-√6 4 tan(75°) B www 15 ) ( 13).co(+5)-(15) 187 V6 COS -7m 12 D.-2-13 csc(22.5°) V3 2 E. 2 A. √2-√2 √2-√6 B. 4 v tan(759) sin 71 18 57 COS 18 77 + COS sin 5 18 V3+V6 18 C2 -7 12 V COS 0.-2-13 csc(22.5) V3 E. 2 3+3 4 F

  • Please explain how you got the answers to A-D, I have to show work. Also, please...

    Please explain how you got the answers to A-D, I have to show work. Also, please do not forget (d) all the way on the bottom. It all didn't fit in the snapshot but you can still see the equation. Thank you! 3. [-/1 Points] DETAILS 0/1 Submissions Used Complete and balance the following acid-base and acid-carbonate reactions. (Use the lowest possible coefficients.) (a) HNO3 + KOH → Help chemPad x.x = Greek (b) HC2H302 + K2CO3 → chemPad Help...

  • Please use the equation sheet. Write neat please. Draw a picture please (draw forces (FBD))Please show how you got the e...

    Please use the equation sheet. Write neat please. Draw a picture please (draw forces (FBD))Please show how you got the equation. Show step by step please. Box in answers please. Note: thermal expansion in (°C) gasses in (K) pressure in (pa) and volume in (m³) Q.4 A horizontal block-spring system with the block on a frictionless surface has total 30 mechanical energy equal to 47.0 J and a maximum displacement of 0.240 m from equilibrium position (a) What is the...

  • can you explain how they got Q> 4 i understand how they got 4 but not...

    can you explain how they got Q> 4 i understand how they got 4 but not how to tell if its > or < 8. You face a revenue function: TR(Q) = 12 + 8Q- Q?. a. For what values of Q will your revenues increase? b. Where is your revenue maximized? c. At Q = 5, what is the slope of your revenue function? TR (9) = 12 +80-0² Diffuuntah the funtion neith respect 8-20 o For all the...

  • can someone please explain their answer, I don't know how to determine when to use sin,...

    can someone please explain their answer, I don't know how to determine when to use sin, tan, or cos for the formula

  • Sum and Ditlerence Formulas: To use these formulas, you will either need to separate a single...

    Sum and Ditlerence Formulas: To use these formulas, you will either need to separate a single angle into two angles that we know the trig function values for [such as 12 = 12 + 12 + 4 something of the form of the right side of one of the formulas, and you need to convert it the left side. The first two are done for you. 1, or you will have to the form on Use the Sum and Difference...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT