Test  Status  Code Input and Output 

1  Pass 
a = [1 0];
b = [0 1];
expected=pi/2;
theta = solve_included_vector_angle(a,b)
assert(0.99*expected.001<=theta && theta<=expected*1.01+.001 )
% Is there a better way to allow tolerances?
am =
1
bm =
1
m =
0
theta =
1.5708
theta =
1.5708

2  Pass 
a = [1 1 0];
b = [1 1 2^0.5];
expected=pi/4;
theta = solve_included_vector_angle(a,b)
assert(0.99*expected.001<=theta && theta<=expected*1.01+.001 )
am =
1.4142
bm =
2
m =
2
theta =
0.7854
theta =
0.7854

3  Pass 
a = [2 2];
b = [0 1];
expected=pi/4;
theta = solve_included_vector_angle(a,b)
assert(0.99*expected.001<=theta && theta<=expected*1.01+.001 )
am =
2.8284
bm =
1
m =
2
theta =
0.7854
theta =
0.7854

4  Pass 
a = [1 1];
b = [4 0];
expected=0.75*pi;
theta = solve_included_vector_angle(a,b)
assert(0.99*expected.001<=theta && theta<=expected*1.01+.001 )
am =
1.4142
bm =
4
m =
4
theta =
2.3562
theta =
2.3562

5  Pass 
a = [1 2 3];
b = [1 2 4];
expected=0.161*pi;
theta = solve_included_vector_angle(a,b)
assert(0.99*expected.001<=theta && theta<=expected*1.01+.001 )
am =
3.7417
bm =
4.5826
m =
15
theta =
0.5057
theta =
0.5057

Which values occur exactly three times?
3399 Solvers
2325 Solvers
Create a cell array out of a struct
212 Solvers
208 Solvers
2544 Solvers