Build fourier series on parameters

2 次查看(过去 30 天)
Joy Tian
Joy Tian 2015-8-2
Hi everyone,
I meet a difficulty. I have a mathematical model which needs to take seasonality into consideration.
Up to now, I have found expanding the parameters into the form of Fourier series is the simplest method.
fourier5 = @(t,a,b) a(1)*sin(2*pi*t/365 + b(1))+ a(2)*sin(4*pi*t/365 + b(2))+ a(3)*sin(6*pi*t/365 + b(3))+ a(4)*sin(8*pi*t/365 + b(4))+ a(5);
a(5-by-1),b(4-by-1) are the coefficient vectors for the fourier series.
My final goal is to estimate these parameters with "mle" function like this
mixexp = @(data, alpha, beta1, beta2) (alpha/beta1)*exp(-data/beta1)+((1-alpha)/beta2)*exp(-data/beta2);
mle(data,'pdf',mixexp,'start',[0.5, 100, 100], 'lowerbound',[0,0,0], 'upperbound',[1,1000,1000]);
where alpha, beta1, and beta2 are the parameters corresponding to the form of previous fourier series (with different coefficients for sure).
I hope to obtain the complete estimation values of the coefficients of the parameters.
Further, print out a 365*3 matrix for the parameter estimation.
I don't know how to connect the two coding paragraph, which can make Matlab output not only the iteration limit of mle function (3 scalars), but also the optimization results for each cycle.
It would be very much appreciated if you can show me how to complete the coding.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by