Im using datenum on some datasets to try to see the intersection between the data (using intersect function), the problem is that im getting different times with the same time (the last few numbers are a little bit different). I already saw some people using a different aproach but i don't know how can i do it with my data. Im posting the code im using:
horas = datestr(horas); datas = datestr(datas); timesteps = [num2str(datas) num2str(horas(:,12:17))]; timesteps = datenum(timesteps,'dd-mmm-yyyy HH:MM'); [c,ia,ib]=intersect(timesteps,time_interval); hm0(ib) = hm0;
It should work but since it's not getting all the times, it fails and tells me "In an assignment A(:) = B, the number of elements in A and B must be the same.". But if i can solve the early problem it will work since i already used this function before. Thank you
Best Answer