poisson2Ddirichlet(​F,L,BCl,BCt,BCr,BCb​)

Solves the 2D Poisson equation using spectral method
187 Downloads
Updated 1 Mar 2015

View License

function U = poisson2Ddirichlet(F,L,BCl,BCt,BCr,BCb)
% POISSON2DDIRICHLET Solves the 2D poisson equation d2UdX2 + dU2dY2 = F
% with zero dirichlet
% boundary conditions
% U = POISSON2DDIRICHLET(F,L,BCl,BCt,BCr,BCb)
%
% F: Right hand side of the equation (N*N Matrix)
% L: Length of the domain (scalar)
% BCl: Left boundary condition (N*1 vector)
% BCt: Top boundary condition (N*1 vector)
% BCr: Right boundary condition (N*1 vector)
% BCb: Bottom boundary condition (N*1 vector)
%
% Please note the the boundaries are added to the matrix F as follows:
% BCl = F(1,:)
% BCt = F(:,end)
% BCr = F(end,:)
% BCb = F(:,1)

Cite As

Koorosh Gobal (2024). poisson2Ddirichlet(F,L,BCl,BCt,BCr,BCb) (https://www.mathworks.com/matlabcentral/fileexchange/49879-poisson2ddirichlet-f-l-bcl-bct-bcr-bcb), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0