Cody

Solution 747278

Submitted on 27 Sep 2015 by LY Cao
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

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: [0 0 1] LineStyle: '-' LineWidth: 0.5000 Marker: 'none' MarkerSize: 6 MarkerFaceColor: 'none' XData: [0.5706 0.7351 0.7683 0.6531 0.2383 0.1675 0.7222 0.1988 0.3096 0.8938] YData: [0.5535 0.1786 0.6088 0.8145 0.7826 0.0163 0.6159 0.0511 0.5695 0.1351] ZData: [1x0 double] Show all properties

Wf7f5xxg5rz5uaaaaasuvork5cyii="}

Suggested Problems

More from this Author2