Cody

Solution 2180372

Submitted on 28 Mar 2020 by Jamal Nasir
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.8588 0.0909 0.4142 0.2546 0.6835 0.0692 0.6415 0.9922 0.5236 0.8259] YData: [0.6293 0.4604 0.2000 0.8681 0.6889 0.6528 0.4508 0.7004 0.6380 0.0022] ZData: [1×0 double] Show all properties

  

Suggested Problems

More from this Author2