Cody

Solution 1728070

Submitted on 15 Feb 2019 by ESSRA EMHIDI
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: [1 0 0] LineStyle: '-' LineWidth: 0.5000 Marker: 'none' MarkerSize: 6 MarkerFaceColor: 'none' XData: [0.7082 0.0121 0.2212 0.4832 0.5242 0.0300 0.9371 0.2415 0.1086 0.1307] YData: [0.1142 0.0350 0.7901 0.4787 0.2535 0.9330 0.4838 0.0683 0.4371 0.1259] ZData: [1×0 double] Show all properties

Wmpyfo8ptpz+waaaabjru5erkjggg=="}]

More from this Author2