% Copyright 2021 Marcan Graffin - marcan.graffin@etu.toulouse-inp.fr % % INPUT : varDaily(x,t) is a n spatial dimension daily time serie and time is the % associated time vector (e.g. time=730486:737791) % OUTPUT : varMounthly(x,t) is a n spatial dimension mounthly time serie and % mounths is the associated time vector (each value is affected at the % first day of the mounth, mounths(1)=730486 i.e. '01-Jan-2000' and % mounths(2)=730517 i.e. '01-Feb-2000'. % % % function [varMounthly mounths]=fromDaily2Mounthly(varDaily,time) s=length(size(varDaily)); % for one spatial dimension if s==2 i=1; N=[1]; mounths=[] while i