Cody

Solution 2359438

Submitted on 24 May 2020
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
x = 'a=[1 2 3 4 5];'; y_correct = 5; assert(isequal(your_fcn_name(x),y_correct))

Error: You may not use the command(s) eval in your code

2   Fail
x = 'a=ones(1,10);'; y_correct = 10; assert(isequal(your_fcn_name(x),y_correct));

Error: You may not use the command(s) eval in your code

3   Fail
x = 'a=zeros(0,0);'; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

Error: You may not use the command(s) eval in your code

4   Fail
x = 'a=1:10'; y_correct = 10; assert(isequal(your_fcn_name(x),y_correct))

Error: You may not use the command(s) eval in your code

5   Fail
x = 'a=1:2:10;'; y_correct = 5; assert(isequal(your_fcn_name(x),y_correct))

Error: You may not use the command(s) eval in your code

6   Fail
x = 'a=[];'; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

Error: You may not use the command(s) eval in your code

7   Fail
x = 'a=ones(10,1);'; y_correct = 10; assert(isequal(your_fcn_name(x),y_correct));

Error: You may not use the command(s) eval in your code