CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   TDMA in Matlab (https://www.cfd-online.com/Forums/main/86468-tdma-matlab.html)

zamet63 March 23, 2011 10:47

TDMA in Matlab
 
hi everyone i m studying the computational fluid dynamics book of VERSTEEG AND MALALASEKERA i am trying to write a code i matlab that will generate the equations in example 4.2 page 92 can anyone help me with solving tridiagonal matrix in matlab

ARTem March 26, 2011 14:23

Hello, zamet63.

What exactly you need? You have some troubles with interpretation tdma or matlab syntax? Or you want to fill matrices A & b (from equation Ax = b) with necessary coefficients?

Artem.

a.r.zarif April 17, 2011 17:29

Quote:

Originally Posted by zamet63 (Post 300731)
hi everyone i m studying the computational fluid dynamics book of VERSTEEG AND MALALASEKERA i am trying to write a code i matlab that will generate the equations in example 4.2 page 92 can anyone help me with solving tridiagonal matrix in matlab

Hi
you're joking!!!!!!!!!!!!!
it's easy!!!!!!!!!!!!!
go to chapter 7

zamet63 May 4, 2011 07:37

i dont need the solutions i need a fortran or matlab code that will solve it i mean i dont want solving by hand i want solving with computer

DoHander May 4, 2011 08:31

Try to use some of the Matlab specialized functions for solving tri-diagonal systems (use spdiags to generate your sparse matrix and simply solve this with the slash operator).

Or ... use Google to find this link (you have C, Matlab and Fortran implementations of TDMA here):

http://en.wikipedia.org/wiki/Tridiag...trix_algorithm

Do


All times are GMT -4. The time now is 19:52.