Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
today = java.util.Date;
c = java.util.Calendar.getInstance();
c.setTime( today );
dayOfWeek = c.get(java.util.Calendar.DAY_OF_WEEK);
switch dayOfWeek
case 1
dayOfWeek = 'Sunday';
case 2
dayOfWeek = 'Monday';
case 3
dayOfWeek = 'Tuesday';
case 4
dayOfWeek = 'Wednesday';
case 5
dayOfWeek = 'Thursday';
case 6
dayOfWeek = 'Friday';
case 7
dayOfWeek = 'Saturday';
end
assert(strcmp(dayOfWeek,day_of_week()))
dd =
Monday
|
Find the sum of all the numbers of the input vector
31947 Solvers
434 Solvers
middleAsColumn: Return all but first and last element as a column vector
387 Solvers
Getting the absolute index from a matrix
211 Solvers
2455 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!