Block Pentadiagonal Solver

Solves the block pentadiagonal system Ax = f, where a, b, c, d, and e are the five diagonals of A
ダウンロード: 22
更新 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 (2025). 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