Difference between revisions of "Fdhess.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page with "Returns the finite-difference Hessian of a 3D array using a finite difference scheme with a user-specified number of stencil points. The dimensions of the 3D array are assumed...")
 
Line 1: Line 1:
−
Returns the finite-difference Hessian of a 3D array using a finite difference scheme with a user-specified number of stencil points. The dimensions of the 3D array are assumed to be ordered as [X Y Z]. Syntax:
+
{{DISPLAYTITLE:fdhess.m}}
 +
Returns the finite-difference Hessian of a 3D array using a finite difference scheme with a user-specified number of stencil points and a unit grid spacing. The dimensions of the 3D array are assumed to be ordered as [X Y Z].
  
−
                        H=fdhess(A,npoints)
+
==Syntax==
  
−
where the second parameter specifies the number of points in the finite difference stencil that should be used. The result is a 3x3 cell array of 3D matrices ordered in the following way:
+
    H=fdhess(A,nstenc)
  
−
                  {d2A_dxdx  d2A_dxdy  d2A_dxdz
+
==Arguments==
−
                    d2A_dydx  d2A_dydy  d2A_dydz
+
 
−
                    d2A_dzdx  d2A_dzdy  d2A_dzdz}
+
    A      - a 3D array with dimensions ordered as [X Y Z]
 +
 +
    nstenc - number of points inthe finite difference stencil,
 +
              periodic boundary conditions are used
 +
 
 +
==Outputs==
 +
 
 +
    H      - a 3x3 cell array of 3D arrays ordered in the
 +
              following way:
 +
 +
                    {d2A_dxdx  d2A_dxdy  d2A_dxdz
 +
                      d2A_dydx  d2A_dydy  d2A_dydz
 +
                      d2A_dzdx  d2A_dzdy  d2A_dzdz}
 +
 
 +
==See also==
 +
[[fdvec.m]], [[fdlap.m]], [[fdkup.m]], [[fdmat.m]], [[fdweights.m]], [[fftdiff.m]], [[fourdif.m]], [[fourlap.m]]
 +
 
 +
 
 +
''Version 2.2, authors: [[Ilya Kuprov]]''

Revision as of 14:41, 16 August 2018

Returns the finite-difference Hessian of a 3D array using a finite difference scheme with a user-specified number of stencil points and a unit grid spacing. The dimensions of the 3D array are assumed to be ordered as [X Y Z].

Syntax

    H=fdhess(A,nstenc)

Arguments

    A      - a 3D array with dimensions ordered as [X Y Z]

    nstenc - number of points inthe finite difference stencil,
             periodic boundary conditions are used

Outputs

    H      - a 3x3 cell array of 3D arrays ordered in the
             following way:

                    {d2A_dxdx  d2A_dxdy  d2A_dxdz
                     d2A_dydx  d2A_dydy  d2A_dydz
                     d2A_dzdx  d2A_dzdy  d2A_dzdz}

See also

fdvec.m, fdlap.m, fdkup.m, fdmat.m, fdweights.m, fftdiff.m, fourdif.m, fourlap.m


Version 2.2, authors: Ilya Kuprov