Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
xv = [0 1 0];
yv = [0 0 1];
X = 0.8;
Y = 0.8;
tf_correct = false;
assert(isequal(inside(xv,yv,X,Y),tf_correct))
tf =
logical
0
|
2 | Pass |
xv = [0 1 1 0];
yv = [0 0 1 1];
X = 0.5;
Y = 0.5;
tf_correct = true;
assert(isequal(inside(xv,yv,X,Y),tf_correct))
tf =
logical
1
|
3 | Pass |
xv = [0 1 1 0];
yv = [0 0 1 1];
X = 0.5;
Y = 0.5;
tf_correct = true;
assert(isequal(inside(xv,yv,X,Y),tf_correct))
tf =
logical
1
|
4 | Pass |
xv = [0 0.25 0.25 0];
yv = [0 0 1 1];
X = 0.5;
Y = 0.5;
tf_correct = false;
assert(isequal(inside(xv,yv,X,Y),tf_correct))
tf =
logical
0
|
5 | Pass |
xv = [0 0.25 0.25 0] + 1000;
yv = [0 0 1 1] + 1000;
X = 1000.1;
Y = 1000.1;
tf_correct = true;
assert(isequal(inside(xv,yv,X,Y),tf_correct))
tf =
logical
1
|
Replace NaNs with the number that appears to its left in the row.
2018 Solvers
151 Solvers
Create a matrix X, where each column is a shifted copy of the vector v
142 Solvers
250 Solvers
255 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!