Block Pentadiagonal Solver

버전 1.0.2 (1.77 KB) 작성자: Lateef Adewale Kareem
Solves the block pentadiagonal system Ax = f, where a, b, c, d, and e are the five diagonals of A
다운로드 수: 20
업데이트 날짜: 2022/5/28

라이선스 보기

% BlockPentSolve.m
%
% Solves the block pentadiagonal system Ax = f, where a, b, c, d, and e are
% the five diagonals of A. if the size of the block is n-by-n, then c is M-by-n,
% b and d are each (M-n)-by-n, while a and e are each (M - 2n)-by-n, f is
% M-by-X, M is divisible by n, n >= 1.
%
% M = 12; n = 3;
% a = rand((M-2)*n, n); b = rand((M-1)*n, n); c = 5+rand(M*n, n);
% d = rand((M-1)*n, n); e = rand((M-2)*n, n); f = rand(M*n,10);
% x = BlockPentSolve(a, b, c, d, e, f);
%
% We can make block matrix A = BlockDiag(a, n, n, -2) +
% BlockDiag(b, n, n, -1) + BlockDiag(c, n, n) + BlockDiag(d, n, n, 1) +
% BlockDiag(e, n, n, 2); and then x = A\d to confirm the solution.
%
% Computational Cost of this method is 2M(5n^3+4n^2-n/3). The cost is
% of order M*n^3. This is better than the backslash which is order (M*n)^3
%
% For M = 500, n = 4; This function is faster than inbuilt backslash by
% factor of 2.5
%
% Written by: Lateef Adewale Kareem 05/25/2022
% Contact: talk2laton@yahoo.co.uk

인용 양식

Lateef Adewale Kareem (2024). Block Pentadiagonal Solver (https://www.mathworks.com/matlabcentral/fileexchange/112335-block-pentadiagonal-solver), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2022a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.2

Removed the leading zeros in a and b

1.0.1

renamed

1.0.0