Asked by Gokturk
on 15 Dec 2012

Sorry for this presumably simple question, but i am new in coding. I want matlab to make a computation for specific dates but it does not read dates from the excel file. To give a simple example, lets say we have different observations for each date (number of observations is changing date to date) and on excel: first column for dates and second is for observations. I want matlab to read first column, and get the observations for each date separately and lets say take average of the observations, that is showing daily average, sum all observations for each date and divide number of obs (length of obs vector) Thanks a lot for your help

[EDITED, Jan, copied from Answer section, but this is an important part of the question]

Hi, thanks for the replies, but I gave taking averages as an example, my problem in here is, how to get data from xls depending on specific dates I do have a sheet like;

date1 12314 03123 date1 11321 84646 date2 46469 4580 .. 46461 4667 daten 78974 8795

(first column is for date second and third..for data)

and I want to get data assigned to each date (colums right next to dates) separately so that I can make some computations on them. I searched and found that I can get data by datenum, and transfer it to matlab date, thats fine. But I could not figure out how I can split data according to the dates :(

*No products are associated with this question.*

Answer by Mark Whirdy
on 16 Dec 2012

doc xlsread doc movavg doc accumarray

Gokturk
on 23 Jan 2013

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply Today
## 1 Comment

## bym (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/56673#comment_117387

what have you done so far? I suggest you look into