MATLAB Examples

Solve Poisson's equation using the programmatic workflow. For the PDE Modeler app solution, see docid:pde_ug.bvhf75n . The problem formulation is - \Delta u = 1 in \Omega , u = 0 on \delta

Perform one-level domain decomposition for complicated geometries, where you can decompose this geometry into the union of more subdomains of simpler structure. Such structures are

Calculate eigenvalues and eigenvectors using the programmatic workflow. For the PDE Modeler app solution, see Eigenvalues and Eigenmodes of the L-Shaped Membrane: PDE App .

Compute the eigenvalues and eigenmodes of a square domain using the programmatic workflow. For the PDE Modeler app solution, see Eigenvalues and Eigenmodes of a Square .

Solve for the heat distribution in a block with cavity using the programmatic workflow. For the PDE Modeler app solution, see Heat Equation for a Block with Cavity: PDE App .

The calculation of the vibration modes of a circular membrane. The calculation of vibration modes requires the solution of the eigenvalue partial differential equation (PDE). In this

Solve the heat equation with a source term using the Partial Differential Equation Toolbox™.

How a 3-D axisymmetric model can be analyzed using a 2-D model. The model geometry, material properties, and boundary conditions must all be symmetric about a single axis for this

Perform a heat transfer analysis of a thin plate using the Partial Differential Equation Toolbox™.

An idealized thermal analysis of a rectangular block with a rectangular cavity in the center. One of the purposes of this example is to show how temperature-dependent thermal conductivity

Perform a 3-D transient heat conduction analysis of a hollow sphere made of three different layers of material, subject to a nonuniform external heat flux.

Solve a nonlinear elliptic problem.

Create a cardioid geometry using four distinct techniques. The techniques are ways to parametrize your geometry using arc length calculations. The cardioid satisfies the equation .

A PDE model stores initial conditions in its InitialConditions property. Suppose model is the name of your model. Obtain the initial conditions:

Import a 3-D mesh into a PDE model. Importing a mesh creates the corresponding geometry in the model.

A PDE model stores coefficients in its EquationCoefficients property. Suppose model is the name of your model. Obtain the coefficients:

A PDE model stores boundary conditions in its BoundaryConditions property. To obtain the boundary conditions stored in the PDE model called model , use this syntax:

There are two types of boundaries:

Create a polygonal geometry using the MATLAB polyshape function. Then use the triangulated representation of the geometry as an input mesh for the geometryFromMesh function.

This figure shows how the direction of parameter increase relates to label numbering. The arrows in the following figure show the directions of increasing parameter values. The black dots

Use a geometry function to create a circular region. Parametrize a circle with radius 1 centered at the origin (0,0) as follows:

Create a geometry file for a region with subdomains and a hole. It uses the "Analytic Arc Length" section of the "Arc Length Calculations for a Geometry Function" example and a variant of the

Create contour slices in various directions through a solution in 3-D geometry.

Solves a Poisson's equation with a delta-function point source on the unit disk using the adaptmesh function in the Partial Differential Equation Toolbox™.

Numerically solve a Poisson's equation using the solvepde function in Partial Differential Equation Toolbox™.

Calculate the approximate gradients of a solution, and how to use those gradients in a quiver plot or streamline plot.

Obtain a surface plot of a solution with 3-D geometry and N > 1.

Obtain plots from 2-D slices through a 3-D geometry.

Calculate the deflection of a structural plate acted on by a pressure loading using the Partial Differential Equation Toolbox™.

Solve a coupled elasticity-electrostatics problem using Partial Differential Equation Toolbox™. Piezoelectric materials deform when a voltage is applied. Conversely, a voltage is

Include damping in the transient analysis of a simple cantilever beam analyzed with the Partial Differential Equation Toolbox™. The beam is modeled with a plane stress elasticity

Analyze an idealized 3-D mechanical part under an applied load using Finite Element Analysis (FEA). The objective of the analysis is to determine the maximal deflection caused by the load.

Calculate the vibration modes and frequencies of a 3-D simply supported, square, elastic plate. The dimensions and material properties of the plate are taken from a standard finite element

The Partial Differential Equation Toolbox™ analysis of the dynamic behavior of a beam clamped at both ends and loaded with a uniform pressure load. The pressure load is suddenly applied at

Perform modal and transient analysis of a tuning fork.

Perform a 2-D plane-stress elasticity analysis.

Solve the wave equation using the solvepde function in the Partial Differential Equation Toolbox™.

Solve a Helmholtz equation using the solvepde function in Partial Differential Toolbox™.

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Contact your local office