
10:12 PM (0 minutes ago)



Sir, the code I’d written for simulation of fractional differential system is not working yet but it should be working by tomorrow. The output now is a lot of NA’s. This can be fixed up quite quickly and is the key bottleneck for some simulations and tuning theta parameters. The onedimensional fracdiff now is quite fast since it uses fft. Besides this I’ll change the RiemannLiouville derivative with the Caputo derivative. I think we can have trustable residuals tomorrow or at most a couple of days.
function( initial.values, theta, timelen ){
# assume system is simply
#
# y^(alpha)(t) – theta[2]*y(t) == theta[3]*y(t)**theta[4], y(0)=1
#
alpha<theta[1]
#N<length(initial.values)
N<timelen
niter<100
y<matrix( 0, nrow=N, ncol=niter)
y[1,]<initial.values
for (j in 2:niter){
fractional.derivative<fracdiff(y[,j1],alpha)
yterm<theta[2]*y[,j1]
convection<theta[3]*y[,j1]**theta[4]
y[,j]<y[,j1] + 1/gamma(theta[1])*(fractional.derivative – yterm)
}
y[,niter]
}
Attachments area
Advertisements
Leave a Reply