Cody

Problem 2252. Create matrix with common dates from a number of structs -inner join on dates

Solution 420766

Submitted on 20 Mar 2014 by Tim
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
%% 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))

``` ```