Cody

Solution 175451

Submitted on 10 Dec 2012
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
%% l = 5; s = '#=~-'; y_correct = strvcat({ '#=~--' '=#---' '~=#--' '-~=#-' '--~=#' '---#=' '--#=~' '-#=~-' '#=~--' }); assert(isequal(kitt(l,s),y_correct))
ans = '=#---' '~=#--' '-~=#-' '--~=#' ans = #=~-- =#--- ~=#-- -~=#- --~=# ---#= --#=~ -#=~- #=~--
2   Fail
%% l = 2; s = '*'; y_correct = strvcat({ '**' '**' }); assert(isequal(kitt(l,s),y_correct))
Error: Subscript indices must either be real positive integers or logicals.
3   Fail
%% l = 5; s = '@ '; y_correct = strvcat({ '@ ' ' @ ' ' @ ' ' @ ' ' @' ' @ ' ' @ ' ' @ ' '@ ' }); assert(isequal(kitt(l,s),y_correct))
Error: Assertion failed.
4   Fail
%% l = 6; s = '@>>*=~ '; y_correct = strvcat({ '@>>*=~' '>@*=~ ' '>>@~ ' '*>>@ ' '=*>>@ ' '~=*>>@' ' ~=*@>' ' ~@>>' ' @>>*' ' @>>*=' '@>>*=~' }); assert(isequal(kitt(l,s),y_correct))
Error: Assertion failed.