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))
|
Back to basics 6 - Column Vector
809 Solvers
337 Solvers
Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
123 Solvers
138 Solvers
Given a 4x4 matrix, swap the two middle columns
300 Solvers