Cody

# Problem 1744. Make a Plot with Functions

Solution 1883220

Submitted on 24 Jul 2019 by Sarah Walls
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.2820 0.9519 0.6400 0.4031 0.1790 0.8032 0.6190 0.3132 0.2977 0.7857] YData: [0.7075 0.6075 0.7050 0.8176 0.9282 0.0764 0.6601 0.4436 0.0629 0.0722] ZData: [1×0 double] Show all properties

`  `