# Tridiagonal Matrix Algorithm [![View Tridiagonal Matrix Algorithm on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/85438-tridiagonal-matrix-algorithm)
<br/><br/>
# `tridiagonal_matrix`
Solves the tridiagonal linear system <img src="https://latex.codecogs.com/svg.latex?\inline&space;\mathbf{A}\mathbf{x}=\mathbf{d}"/> for <img src="https://latex.codecogs.com/svg.latex?\inline&space;\mathbf{x}\in\mathbb{R}^{n}" title="\mathbf{x}\in\mathbb{R}^{n}" /> using the matrix implementation of the tridiagonal matrix algorithm.
## Syntax
`x = tridiagonal_matrix(A,d)`
## Description
`x = tridiagonal_matrix(A,d)` solves the tridiagonal linear system <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{A}\mathbf{x}=\mathbf{d}"/> for <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{x}\in\mathbb{R}^{n}" title="\mathbf{x}\in\mathbb{R}^{n}" />, where <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{A}\in&space;{\mathbb{R}}^{n\times&space;n}"/> is a tridiagonal matrix and <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{d}\in&space;{\mathbb{R}}^n"/>.
<br/><br/>
# `tridiagonal_vector`
Solves the tridiagonal linear system <img src="https://latex.codecogs.com/svg.latex?\inline&space;\mathbf{A}\mathbf{x}=\mathbf{d}"/> for <img src="https://latex.codecogs.com/svg.latex?\inline&space;\mathbf{x}\in\mathbb{R}^{n}" title="\mathbf{x}\in\mathbb{R}^{n}" /> using the vector implementation of the tridiagonal matrix algorithm.
## Syntax
`x = tridiagonal_vector(a,b,c,d)`
## Description
`x = tridiagonal_vector(a,b,c,d)` solves the tridiagonal linear system <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{A}\mathbf{x}=\mathbf{d}"/> for <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{x}\in\mathbb{R}^{n}" title="\mathbf{x}\in\mathbb{R}^{n}" />, where <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{A}\in&space;{\mathbb{R}}^{n\times&space;n}"/> is a tridiagonal matrix defined using the tridiagonal vectors (<img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{a}\in\mathbb{R}^{n-1}"/>, <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{b}\in\mathbb{R}^{n}"/>, and <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{c}\in\mathbb{R}^{n-1}"/>) and where <img src="https://latex.codecogs.com/svg.image?\inline&space;\mathbf{d}\in&space;{\mathbb{R}}^n"/>.
<br/><br/>
# Tridiagonal Matrix Convention
For these implementations, I use the following convention for denoting the elements of the tridiagonal matrix <img src="https://latex.codecogs.com/svg.latex?\inline&space;\mathbf{A}"/>:
<img src="https://latex.codecogs.com/svg.latex?\mathbf{A}=\left\lbrack&space;\begin{array}{cccccc}&space;b_1&space;&space;&&space;c_1&space;&space;&&space;&space;&&space;&space;&&space;&space;&&space;\\&space;a_1&space;&space;&&space;b_2&space;&space;&&space;c_2&space;&space;&&space;&space;&&space;&space;&&space;\\&space;&space;&&space;a_2&space;&space;&&space;\ddots&space;&space;&&space;\ddots&space;&space;&&space;&space;&&space;\\&space;&space;&&space;&space;&&space;\ddots&space;&space;&&space;\ddots&space;&space;&&space;c_{n-2}&space;&space;&&space;\\&space;&space;&&space;&space;&&space;&space;&&space;a_{n-2}&space;&space;&&space;b_{n-1}&space;&space;&&space;c_{n-1}&space;\\&space;&space;&&space;&space;&&space;&space;&&space;&space;&&space;a_{n-1}&space;&space;&&space;b_n&space;&space;\end{array}\right\rbrack"/>
Most other references have <img src="https://latex.codecogs.com/svg.latex?\inline&space;a_i"/>'s ranging from <img src="https://latex.codecogs.com/svg.latex?\inline&space;a_2"/> to <img src="https://latex.codecogs.com/svg.latex?\inline&space;a_n"/> both in the definition of the tridiagonal matrix and in the algorithm used to solve the corresponding linear system. In this implementation, I have the <img src="https://latex.codecogs.com/svg.latex?\inline&space;a_i"/>'s ranging from <img src="https://latex.codecogs.com/svg.latex?\inline&space;a_1"/> to <img src="https://latex.codecogs.com/svg.latex?\inline&space;a_{n-1}"/>; this makes the algorithm slightly more straightforward to implement.
<br/><br/>
# Examples and Additional Documentation
- See "EXAMPLES.mlx" or the "Examples" tab on the File Exchange page for examples.
- See ["Tridiagonal_Matrix_Algorithm.pdf"](https://tamaskis.github.io/files/Tridiagonal_Matrix_Algorithm.pdf) (also included with download) for the technical documentation.
没有合适的资源?快使用搜索试试~ 我知道了~
在笛卡尔坐标系中,使用离散透明边界条件对一维薛定谔方程进行数值模拟的 MATLAB 代码.zip
共21个文件
m:7个
mp4:6个
md:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 57 浏览量
2024-06-07
21:53:40
上传
评论
收藏 14.88MB ZIP 举报
温馨提示
1.版本:matlab2014/2019a/2021a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
在笛卡尔坐标系中,使用离散透明边界条件对一维薛定谔方程进行数值模拟的 MATLAB 代码.zip (21个子文件)
在笛卡尔坐标系中,使用离散透明边界条件对一维薛定谔方程进行数值模拟的 MATLAB 代码
Schrodinger-1D-Cartesian-DTBCs-main
+Potential_Functions
Harmonic_Oscillator.m 650B
Free_Space.m 87B
README.md 177B
Renders
Free_Space_mux=0_mup=10,sigmax=1.mp4 3.05MB
Free_Space_mux=0_mup=1,sigmax=1.mp4 1.14MB
Free_Space_mux=0_mup=0,sigmax=1.mp4 1.03MB
Harmonic_Oscillator_k=0.5_xbreak=2.5_mux=-6_mup=10,sigmax=1.mp4 5.03MB
Harmonic_Oscillator_k=0.5_xbreak=2.5_mux=0_mup=0,sigmax=1.mp4 804KB
Harmonic_Oscillator_k=0.5_xbreak=2.5_mux=-6_mup=1,sigmax=1.mp4 4.12MB
+Initial_Conditions
Wave_Packet_Min_Sigma.m 388B
README.md 175B
+tridiagonal_MATLAB_main
tridiagonal_vector.m 2KB
Tridiagonal_Matrix_Algorithm.pdf 252KB
LICENSE 1KB
tridiagonal_matrix.m 1KB
EXAMPLES.mlx 5KB
.gitignore 17B
README.md 5KB
Animator.m 2KB
Solver.m 4KB
README.md 191B
共 21 条
- 1
资源评论
matlab科研助手
- 粉丝: 3w+
- 资源: 5960
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功