Cody

Solution 1210080

Submitted on 11 Jun 2017 by Said BOUREZG
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.5726 0.6893 0.8752 0.7802 0.0974 0.7172 0.4068 0.0366 0.3941 0.0917] YData: [0.9956 0.1806 0.9957 0.2695 0.4329 0.3108 0.6364 0.7640 0.4531 0.0779] ZData: [1×0 double] Show all properties

8g77ngft0aaaaaelftksuqmcc"}]

Suggested Problems

More from this Author2