Cody

# Problem 1744. Make a Plot with Functions

Solution 613245

Submitted on 7 Apr 2015 by goc3
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.0020 0.3587 0.9812 0.5717 0.8585 0.3145 0.7109 0.2417 0.5622 0.1320] YData: [0.3853 0.2799 0.7528 0.7814 0.2139 0.2377 0.0728 0.3323 0.9942 0.8867] ZData: [1x0 double] Show all properties