Cody

Solution 1701917

Submitted on 3 Jan 2019
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
N = 384; a_correct = 42; assert(isequal(age(N),a_correct))

q = 393 402 411 420 429 438 447 456 465 474

Error using find Second argument must be a positive scalar integer. Error in age (line 3) e=find(mod(N+(1:10).*9,10),0) Error in Test1 (line 3) assert(isequal(age(N),a_correct))

2   Fail
N = 366; a_correct = 42; assert(isequal(age(N),a_correct))

q = 375 384 393 402 411 420 429 438 447 456

Error using find Second argument must be a positive scalar integer. Error in age (line 3) e=find(mod(N+(1:10).*9,10),0) Error in Test2 (line 3) assert(isequal(age(N),a_correct))

3   Fail
N = 381; a_correct = 39 assert(isequal(age(N),a_correct))

a_correct = 39 q = 390 399 408 417 426 435 444 453 462 471

Error using find Second argument must be a positive scalar integer. Error in age (line 3) e=find(mod(N+(1:10).*9,10),0) Error in Test3 (line 3) assert(isequal(age(N),a_correct))

4   Fail
N = 302; a_correct = 32; assert(isequal(age(N),a_correct))

q = 311 320 329 338 347 356 365 374 383 392

Error using find Second argument must be a positive scalar integer. Error in age (line 3) e=find(mod(N+(1:10).*9,10),0) Error in Test4 (line 3) assert(isequal(age(N),a_correct))

5   Fail
N = 389; a_correct = 47; assert(isequal(age(N),a_correct))

q = 398 407 416 425 434 443 452 461 470 479

Error using find Second argument must be a positive scalar integer. Error in age (line 3) e=find(mod(N+(1:10).*9,10),0) Error in Test5 (line 3) assert(isequal(age(N),a_correct))

Suggested Problems

More from this Author1