Cody

Solution 2025916

Submitted on 18 Nov 2019 at 4:13
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   Fail
clf; t = linspace(0,15,400); y = exp(-0.5*t).*cos(2*pi.*t); m = plot_cos(y, t); f = gcf; assert(isequal([f.Children.Children.Color], [1 0 0 0 0 1])) assert(strcmp([f.Children.Children.LineStyle], 'none--')) assert(strcmp([f.Children.Children.Marker],'*none')) assert(isequal([f.Children.Children.YData],[m, y]))

a = 0.4887 b = -0.7812 m = 2×1 Line array: Line Line

Error using matlab.graphics.chart.primitive.Line/horzcat Cannot convert double value 0.954128 to a handle Error in Test1 (line 9) assert(isequal([f.Children.Children.YData],[m, y]))

Wcpwpj+piajoqaaaabjru5erkjggg=="}]
2   Fail
clf; t = linspace(2,5,100); y = exp(-0.5*t).*cos(2*pi.*t); m = plot_cos(y, t); f = gcf; assert(isequal([f.Children.Children.Color], [1 0 0 0 0 1])) assert(strcmp([f.Children.Children.LineStyle], 'none--')) assert(strcmp([f.Children.Children.Marker],'*none')) assert(isequal([f.Children.Children.YData],[m, y]))

a = 2.4848 b = -0.2874 m = 2×1 Line array: Line Line

Error using matlab.graphics.chart.primitive.Line/horzcat Cannot convert double value 0.367879 to a handle Error in Test2 (line 9) assert(isequal([f.Children.Children.YData],[m, y]))

Aen8yao4nujuaaaaaelftksuqmcc"}]