Generating A Fractional Differenitation Matrix: Syntax
Generating A Fractional Differenitation Matrix: Syntax
differenitation matrix
Table of Contents
Syntax ...............................................................................................................................
Methods: Fractional Chabysheev differentiation matrix (Caputo) .................................................
Methods: Fractional Chabysheev differentiation matrix (Riemann-Liouville) ..................................
Methods: Fractional Chabysheev differentiation matrix (Gunwald-Letnikov) ..................................
OUTPUTS: ........................................................................................................................
Example 1: Caputo ..............................................................................................................
Example 2: Riemann-Liouville ..............................................................................................
1
1
2
2
2
2
3
Syntax
[D,x]=fcdm(alpha,N,'t',T,'method',METHODS);
ALPHA: fractional order
N: the size of differentiation matrix
T: the interval [a,b]
METHODS: The following fractional differentiation matrices are available:
2.
3.
4.
5.
6.
7.
8.
CA.polym: Polynomial methods with multi precision arithmetic (requires Multiprecision Computing
Toolbox for MATLAB, www.advanpix.com)
9.
OUTPUTS:
1. x: collocation points
2. D: differenitation matrix
Example 1: Caputo
methods={'CA','CA.pow.pow','CA.pow.log','CA.pow.pade','CA.pow.schur','CA.ADM0','CA.
fun=@(x) (x+1);
figure('units','normalized','outerposition',[0 0 1 1])
for im=1:length(methods)
subplot(2,4,im)
INDEX=linspace(0.1,1-eps,10);
cc=jet(numel(INDEX));
for i=1:numel(INDEX)
[D,x]=fcdm(INDEX(i),100,'t',[0 10],'method',methods{im});
plot(x,D*fun(x),'color',cc(i,:)); hold all;
end
c=colorbar('southoutside');c.Label.String = '\alpha';grid on;
grid minor;
title(['$^C_0D_x^\alpha[y(x)], \alpha=0.5$- Method:
',methods{im}],'interpreter','latex');
xlabel('$x$','interpreter','latex');ylabel('$^C_0D_x^
\alpha[y]$','interpreter','latex');
drawnow
end
Example 2: Riemann-Liouville
methods={'RL','GL','RL.ADM0','RL.ADM1','RLr','RL.pod','RL.podr','RLr'};