Cody

Problem 784. Cody Computer Part 4 : Are you a morning Cody player Addicted ?

Solution 2827938

Submitted on 13 Aug 2020 by Rafael S.T. Vieira
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
% 16 Jan-2013 % I now test Inf since the aim is to submit a problem between 7 and 9 AM sorry guys! % Moreover some comments give the solution which is not fair filetext = fileread('your_fcn_name.m') assert(isempty(strfind(filetext, 'Inf'))) filetext = fileread('your_fcn_name.m') assert(isempty(strfind(filetext, 'inf'))) % 18-Jan-2013 % test suite suggested by Joseph Kirk (thanks) y_correct = false; if str2double(datestr(now,'hh')) >= 7 & str2double(datestr(now,'hh')) <= 9 y_correct = true; end assert(isequal(y_correct,true))

filetext = 'function y = your_fcn_name(x) y = x; end % 4am -3 UTC/GMT %This code written by profile_id 17355128 ' filetext = 'function y = your_fcn_name(x) y = x; end % 4am -3 UTC/GMT %This code written by profile_id 17355128 '

Suggested Problems

More from this Author30

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!