Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 313801

Submitted on 2 Sep 2013 by Jean-Marie SAINTHILLIER

Correct

140Size
Leading solution size is 61.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
aStr = 'dan';
bStr = 'nan';
cStr = 'nora';
out = [921 121 1042];
assert(isequal(cryptoAdd(aStr,bStr,cStr),out))

                    
2
Pass
 
%%
aStr = 'wait';
bStr = 'all';
cStr = 'gifts';
out = [9608 677 10285];
assert(isequal(cryptoAdd(aStr,bStr,cStr),out))

                    
3
Pass
 
%%
aStr = 'memo';
bStr = 'from';
cStr = 'homer';
out = [8485 7358 15843];
assert(isequal(cryptoAdd(aStr,bStr,cStr),out))

                    
4
Pass
 
%%
%aStr = 'coca';
%bStr = 'cola';
%cStr = 'oasis';
%out = [8186 8106 16292];
%assert(isequal(cryptoAdd(aStr,bStr,cStr),out))