View Single Post
  #6  
Old October 27th, 2009, 05:54 AM
elbarto elbarto is offline
Member
 
Join Date: Mar 2007
Posts: 142
Country:
Thanks: 20
Thanked 21 Times in 20 Posts
elbarto is on a distinguished road
Default

jalko,
can you please confirm if I understand this correctly.

1) find all dates within 1 day of each other
2) compute ALL the combinations for difference in values for all these dates. If this is the case I am unsure why there are 2 columns in the x vector. If you can explain this line that would be great:
Code:
z(j,i)=log(x(m1-l,b))-log(x(m1-k,b));
Also if you can explain simply what the output should contain, ie just differences of dates with differences that would be useful. You have got an interesting little problem here by the looks of it.

Im not sure using cellfun will be any faster as I haven't bench marked it yet. Would be interesting to see with a large data set. To understand my previous post look into "anonymous functions". They are quite usful, you can get by with out them usually but if your going to be doing a bit more MATLAB they do make life easier in certain applications.

Elbarto
Reply With Quote