This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test  Status  Code Input and Output 

1  Pass 
x0 = 1;
y0 = 0;
x1 = 0;
y1 = 1;
a = 90;
[x,y,r] = arc_centre(x0,y0,x1,y1,a);
x_correct = 0;
y_correct = 0;
r_correct = 1;
tol=0.00001;
assert(ismembertol(x,x_correct,tol))
assert(ismembertol(y,y_correct,tol))
assert(ismembertol(r,r_correct,tol))
L =
1.4142
theta =
45
r =
1.0000
x =
1.1102e16
y =
1.1102e16

2  Pass 
x0 = 0;
y0 = 1;
x1 = 1;
y1 = 0;
a = 270;
[x,y,r] = arc_centre(x0,y0,x1,y1,a);
x_correct = 0;
y_correct = 0;
r_correct = 1;
tol=0.00001;
assert(ismembertol(x,x_correct,tol))
assert(ismembertol(y,y_correct,tol))
assert(ismembertol(r,r_correct,tol))
L =
1.4142
theta =
45
r =
1.0000
x =
1.1102e16
y =
1.1102e16

3  Pass 
x0 = 1;
y0 = 1;
x1 = 1;
y1 = 1;
a = 45;
[x,y,r] = arc_centre(x0,y0,x1,y1,a);
x_correct = 0;
y_correct = sqrt(2);
r_correct = sqrt(1+(sqrt(2)+1)^2);
tol=0.00001;
assert(ismembertol(x,x_correct,tol))
assert(ismembertol(y,y_correct,tol))
assert(ismembertol(r,r_correct,tol))
L =
2
theta =
67.5000
r =
2.6131
x =
0
y =
1.4142

All your base are belong to us
433 Solvers
Project Euler: Problem 7, Nth prime
380 Solvers
168 Solvers
Implement a bubble sort technique and output the number of swaps required
88 Solvers
Method of Common Differences part1
37 Solvers