#### ramani

##### Member level 4

i need to solve ax=b.

where a is a n×n tridiagonal matrix. b is n×n matix. and x is n×n matrix.

what command in matlab i have to use to get the value of x.

shall i use b/a;

but if i use like this i am getting a wrong value.

what is the correct syntax.

a=[1,2,0;3,1,2;0,3,1];

>> a

a =

1 2 0

3 1 2

0 3 1

b=[3,3,3;3,3,3;3,3,3];

>> b

b =

3 3 3

3 3 3

3 3 3

b/a

ans =

-0.2727 1.0909 0.8182

-0.2727 1.0909 0.8182

-0.2727 1.0909 0.8182

which is wrong one.

even i use b./a i am getting wrong answer.

can anyone please help me