Cody

Solution 260925

Submitted on 13 Jun 2013
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 = [1 2 3 4 5]; c = 'uint32'; y_correct = 'uint32'; assert(strcmp(class(convertto(x,c)),y_correct) && isequal(x,convertto(x,c)))
Error: Output argument "ans" (and maybe others) not assigned during call to "/users/msssystem7/convertto.m>convertto".
2   Pass
%% x = [4 7 0 3 2 2]; c = 'int16'; y_correct = 'int16'; assert(strcmp(class(convertto(x,c)),y_correct) && isequal(x,convertto(x,c)))
ans = 4 7 0 3 2 2 ans = 4 7 0 3 2 2