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 |
x = rand(10,1);
y = rand(1,10);
colors = ['g', 'r', 'b'];
colorNum = randi(length(colors));
color = colors(colorNum);
colorCodes = {[0 1 0], [1 0 0], [0 0 1]};
color_correct = colorCodes{colorNum};
h = makeAPlot(x,y,color);
poltHandle = get(h);
plotColor = poltHandle(1).Color;
plotX = poltHandle(1).XData;
plotY = poltHandle(1).YData;
assert(isequal(plotColor,color_correct))
assert(isequal(plotX',x))
assert(isequal(plotY,y))
h =
Line with properties:
Color: [1 0 0]
LineStyle: '-'
LineWidth: 0.5000
Marker: 'none'
MarkerSize: 6
MarkerFaceColor: 'none'
XData: [0.8871 0.0536 0.1608 0.6164 0.6716 0.5408 0.7112 0.9039 0.8681 0.5040]
YData: [0.8092 0.1560 0.2727 0.2755 0.8944 0.6916 0.6286 0.3119 0.2640 0.2288]
ZData: [1×0 double]
Show all properties
|
405 Solvers
205 Solvers
1029 Solvers
71 Solvers
Find the square of the sum of the digits of a number
88 Solvers