Cody

Solution 1015442

Submitted on 13 Oct 2016 by Asad (Mehrzad) Khoddam
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 1 0] LineStyle: '-' LineWidth: 0.5000 Marker: 'none' MarkerSize: 6 MarkerFaceColor: 'none' XData: [0.3872 0.9857 0.4026 0.0190 0.8130 0.4145 0.8641 0.6182 0.8692 0.1961] YData: [0.9899 0.4058 0.1446 0.1412 0.3677 0.3845 0.3937 0.2153 0.0186 0.9379] ZData: [1×0 double] Show all properties

We0acpwjff6jaaaaabjru5erkjggg=="}]