Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
start = '09-Oct-2016';
for i = 1:10
date = datestr(datenum(start) + i);
doy_correct = 283 + i;
doy = dayoftheyear(date);
assert(isequal(doy, doy_correct));
end
start = '04-Oct-1937';
for i = 1:10
date = datestr(datenum(start) + i);
doy_correct = 277 + i;
doy = dayoftheyear(date);
assert(isequal(doy, doy_correct));
end
doy =
284
doy =
285
doy =
286
doy =
287
doy =
288
doy =
289
doy =
290
doy =
291
doy =
292
doy =
293
doy =
278
doy =
279
doy =
280
doy =
281
doy =
282
doy =
283
doy =
284
doy =
285
doy =
286
doy =
287
|
1961 Solvers
17121 Solvers
Find the maximum number of decimal places in a set of numbers
734 Solvers
Celsius to Fahrenheit converter
388 Solvers
Find out sum of all elements of given Matrix
349 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!