|
The length of dailyflux is <3288x1>.
I know I probably mixed up in the length of matrix for mat2cell, but I cannot figure it out how to modify my code.
Will you please give me a hint?
Thanks,
Michael
%%%%%%%%
??? Error using ==> mat2cell at 116
Input arguments, D1 through D2, must sum to each dimension of the input matrix size, [3288
1].
%%%%%%%%
dailyflux_NT=CO2resp_daily_NT_m2
for Year = 2000:2007
days_per_weird_week=[]
for n = 1:12
days_per_weird_week = [days_per_weird_week ; 7 ; 7 ; 7 ; 7; rem(eomday(Year, n), 7) ]
end
end
ind = find(days_per_weird_week ~= 0)
days_per_weird_week = days_per_weird_week(ind)
for n = 1:length(days_per_weird_week)
dailyflux_NT(n)=sum{mat2cell(dailyflux_NT,days_per_weird_week)}
dailyflux_NT = [dailyflux_NT ; dailyflux_NT(n) / days_per_weird_week(n) * ones(days_per_weird_week(n), 1)]
end
|