Test  Status  Code Input and Output 

1  Fail 
theta = pi/3;
f_name = 'sine';
assert(isequal(trig_func_tool(theta,f_name),sin(theta)))

2  Fail 
theta = pi/3;
f_name = 'cosine';
assert(isequal(trig_func_tool(theta,f_name),cos(theta)))

3  Fail 
theta = pi/3;
f_name = 'tangent';
assert(isequal(trig_func_tool(theta,f_name),tan(theta)))

4  Fail 
theta = pi/3;
f_name = 'cosecant';
assert(isequal(trig_func_tool(theta,f_name),csc(theta)))

5  Fail 
theta = pi/3;
f_name = 'secant';
assert(isequal(trig_func_tool(theta,f_name),sec(theta)))

6  Fail 
theta = pi/3;
f_name = 'cotangent';
assert(isequal(trig_func_tool(theta,f_name),cot(theta)))

7  Fail 
theta = pi/3;
f_name = 'versine';
assert(isequal(trig_func_tool(theta,f_name),1cos(theta)))

8  Fail 
theta = pi/3;
f_name = 'vercosine';
assert(isequal(trig_func_tool(theta,f_name),1+cos(theta)))

9  Fail 
theta = pi/3;
f_name = 'coversine';
assert(isequal(trig_func_tool(theta,f_name),1sin(theta)))

10  Fail 
theta = pi/3;
f_name = 'covercosine';
assert(isequal(trig_func_tool(theta,f_name),1+sin(theta)))

11  Fail 
theta = pi/3;
f_name = 'haversine';
assert(isequal(trig_func_tool(theta,f_name),(1cos(theta))/2))

12  Fail 
theta = pi/3;
f_name = 'havercosine';
assert(isequal(trig_func_tool(theta,f_name),(1+cos(theta))/2))

13  Fail 
theta = pi/3;
f_name = 'hacoversine';
assert(isequal(trig_func_tool(theta,f_name),(1sin(theta))/2))

14  Fail 
theta = pi/3;
f_name = 'hacovercosine';
assert(isequal(trig_func_tool(theta,f_name),(1+sin(theta))/2))

15  Fail 
theta = pi/3;
f_name = 'exsecant';
assert(isequal(trig_func_tool(theta,f_name),sec(theta)1))

16  Fail 
theta = pi/3;
f_name = 'excosecant';
assert(isequal(trig_func_tool(theta,f_name),csc(theta)1))

17  Fail 
theta = pi/3;
f_name = 'chord';
assert(isequal(trig_func_tool(theta,f_name),2*sin(theta/2)))

18  Fail 
theta = pi/5;
f_name = 'sine';
assert(isequal(trig_func_tool(theta,f_name),sin(theta)))

19  Fail 
theta = pi/10;
f_name = 'cosine';
assert(isequal(trig_func_tool(theta,f_name),cos(theta)))

20  Fail 
theta = pi/2.5;
f_name = 'tangent';
assert(isequal(trig_func_tool(theta,f_name),tan(theta)))

21  Fail 
theta = 2*pi/3;
f_name = 'cosecant';
assert(isequal(trig_func_tool(theta,f_name),csc(theta)))

22  Fail 
theta = pi/7;
f_name = 'secant';
assert(isequal(trig_func_tool(theta,f_name),sec(theta)))

23  Fail 
theta = pi/13;
f_name = 'cotangent';
assert(isequal(trig_func_tool(theta,f_name),cot(theta)))

24  Fail 
theta = pi/31;
f_name = 'versine';
assert(isequal(trig_func_tool(theta,f_name),1cos(theta)))

25  Fail 
theta = pi/1.3;
f_name = 'vercosine';
assert(isequal(trig_func_tool(theta,f_name),1+cos(theta)))

26  Fail 
theta = pi/3.3;
f_name = 'coversine';
assert(isequal(trig_func_tool(theta,f_name),1sin(theta)))

27  Fail 
theta = pi/33;
f_name = 'covercosine';
assert(isequal(trig_func_tool(theta,f_name),1+sin(theta)))

28  Fail 
theta = pi/0.7;
f_name = 'haversine';
assert(isequal(trig_func_tool(theta,f_name),(1cos(theta))/2))

29  Fail 
theta = pi/0.3;
f_name = 'havercosine';
assert(isequal(trig_func_tool(theta,f_name),(1+cos(theta))/2))

30  Fail 
theta = pi/13;
f_name = 'hacoversine';
assert(isequal(trig_func_tool(theta,f_name),(1sin(theta))/2))

31  Fail 
theta = pi/31;
f_name = 'hacovercosine';
assert(isequal(trig_func_tool(theta,f_name),(1+sin(theta))/2))

32  Fail 
theta = pi/30;
f_name = 'exsecant';
assert(isequal(trig_func_tool(theta,f_name),sec(theta)1))

33  Fail 
theta = pi/1.3;
f_name = 'excosecant';
assert(isequal(trig_func_tool(theta,f_name),csc(theta)1))

34  Fail 
theta = pi/13;
f_name = 'chord';
assert(isequal(trig_func_tool(theta,f_name),2*sin(theta/2)))

Sort a list of complex numbers based on far they are from the origin.
4259 Solvers
677 Solvers
Back to basics 23  Triangular matrix
616 Solvers
117 Solvers
convert matrix to single column
297 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!