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

Correct

45Size
Leading solution size is 45.
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
 
%%
X(1).date=[73502 73503 73504 73505 73506 73507]; X(1).ts=[100 101 102 102 101 100];
X(2).date=[73503 73504 73506 73507 73508]; X(2).ts=[101 99 100 98 99];
y_correct = [73503 101 101; 73504 102 99; 73506 101 100; 73507 100 98];
assert(isequal(your_fcn_name(X),y_correct))

                    
2
Pass
 
%%
X(1).date=[73502 73503 73504 73505 73506 73507]; X(1).ts=[100 101 102 102 101 100];
X(2).date=[73503 73504 73506 73507 73508]; X(2).ts=[101 99 100 98 99];
X(3).date=[73502 73504 73505 73506 73507]; X(3).ts=[100 102 102 101 100];
y_correct = [73504 102 99 102; 73506 101 100 101; 73507 100 98 100];
assert(isequal(your_fcn_name(X),y_correct))

                    
3
Pass
 
%%
X(1).date=[73502 73503 73504 73505 73506 73507]; X(1).ts=[100 101 102 102 101 100];
X(2).date=[73503 73504 73506 73507 73508]; X(2).ts=[101 99 100 98 99];
X(3).date=[73502 73504 73505 73506 73507]; X(3).ts=[100 102 102 101 100];
X(4).date=[73502 73504 73505 73506]; X(4).ts=[100 102 102 101];
y_correct = [73504 102 99 102 102; 73506 101 100 101 101];
assert(isequal(your_fcn_name(X),y_correct))