0% found this document useful (0 votes)
44 views4 pages

Generating A Fractional Differenitation Matrix: Syntax

Uploaded by

Arman Dabiri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views4 pages

Generating A Fractional Differenitation Matrix: Syntax

Uploaded by

Arman Dabiri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Generating a fractional

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:

Methods: Fractional Chabysheev differentiation matrix (Caputo)


1.

CA (default): The stable recurrence relation

2.

CA.pow.pow: Power method

3.

CA.pow.pade: Schur-Pade method

4.

CA.pow.log: Logarithmic method

5.

CA.pow.schur: Schur decomposition method

6.

CA.pow.schur-parlett: Schur decomposition method

7.

CA.poly: Polynomial methods

8.

CA.polym: Polynomial methods with multi precision arithmetic (requires Multiprecision Computing
Toolbox for MATLAB, www.advanpix.com)

9.

CAr: The stable recurrence relation (Right-Sided)

10. CA.conv: Convolution Method (Left-sided Caputo)


11. CA.ADM0: Using the rectangule rule (Analugus to CA.ADM1)

Generating a fractional differenitation matrix


12. CA.ADM1: Using the trapiziodal rule (Analugus to CA.ADM0)

Methods: Fractional Chabysheev differentiation matrix (Riemann-Liouville)


1. RL: The stable recurrence relation
2. RLr: The stable recurrence relation (Right-Sided)
3. RL.pod: Podlubny matrix (Left-sided Riemann-Liouville)
4. RL.podr: Podlubny matrix (Right-sided Riemann-Liouville)
5. RL.conv: Convolution Method (Left-sided Riemann-Liouville)
6. RL.ADM0: Using the rectangule rule (Analugus to RL.ADM1)
7. RL.ADM1: Using the trapiziodal rule (Analugus to RL.ADM0)

Methods: Fractional Chabysheev differentiation matrix (Gunwald-Letnikov)


1. GL: Gunwald-Letnikov Matrix

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

Generating a fractional differenitation matrix


Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix
Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix
Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix
Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix
Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix
Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix
Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix
Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix
Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix
Warning: Principal matrix logarithm
nonpositive real
eigenvalues. A non-principal matrix

is not defined for A with


logarithm is returned.
is not defined for A with
logarithm is returned.
is not defined for A with
logarithm is returned.
is not defined for A with
logarithm is returned.
is not defined for A with
logarithm is returned.
is not defined for A with
logarithm is returned.
is not defined for A with
logarithm is returned.
is not defined for A with
logarithm is returned.
is not defined for A with
logarithm is returned.
is not defined for A with
logarithm is returned.

Example 2: Riemann-Liouville
methods={'RL','GL','RL.ADM0','RL.ADM1','RLr','RL.pod','RL.podr','RLr'};

Generating a fractional differenitation matrix


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(['$^R_0D_x^\alpha[y(x)], \alpha=0.5$- Method:
',methods{im}],'interpreter','latex');
xlabel('$x$','interpreter','latex');ylabel('$^R_0D_x^
\alpha[y]$','interpreter','latex');
drawnow
end

Published with MATLAB R2016a

You might also like