MATLAB Answers


Extracting common-date data from different excel dates in separate excel workbooks

Asked by b
on 14 Nov 2014
Latest activity Commented on by Geoff Hayes
on 14 Nov 2014
I have 2 excel workbooks with the following date-data:
Date Data
11/14/2014 1.1
11/13/2014 1.2
11/12/2014 1.3
11/14/2014 2.1
11/12/2014 2.2
11/11/2014 2.3
The problem is to extract and plot only the data of the two series corresponding to the common dates. In the above simple example, it will be to plot date vs data for the 1st and 3rd rows of workbook1 (since there is no data for 11/13/2014 in workbook2); and 'hold on', and on the same figure, plot date vs data for the 1st and 2nd rows of workbook2 (since there is no data for 11/11/2014 in workbook1). The plot will contain two date-points on the x-axis (11/14/2014 and 11/12/2014) and two data series - Workbook1Data (1.1 and 1.3) and Workbook2Data (2.1 and 2.2). How to achieve this in MATLAB?

  1 Comment

Have you been able to read in the two sets of data with xlsread? Start with that and then consider how you might merge the two data sets together for those with common dates.

Sign in to comment.

0 Answers