someting is wrong but ı didnt find it , I uploaded this question's image

1 view (last 30 days)
k = 0.16 W/(cm oC)
H = 0.073 W/ (cm2 oC)
Te = 25 oC
Tp = Temperature values of the points on the upper edge.
Q = 27
Δx=Δy=0.5 cm
perform a direct solution of the problem by using finite differences formulas for the derivatives.
clear all ,close all, clc
Q=27;
delh=0.5;
k=0.16;
H=0.073;
te=298;
w=2;
for i=1:15
A(i)=-(Q*delh^2/(k*w))+30*delh;
A(136-i)=-(Q*delh^2/(k*w))-2*delh*H*te/k;
end
for i=16:120
A(i)=-(Q*delh*delh/(k*w));
end
for i=1:9
A(15*i)=A(15*i)-20;
A(15*i-14)=A(15*i-14)-20;
end
for i=1:120
t(i,i)=-4;
end
for i=121:135
t(i,i)=-4-2*delh*H/k;
end
for i=1:134
t((i+1),i)=1;
t(i,(i+1))=1;
end
for i=1:8
t((15*i+1),(15*i))=0;
t((15*i),(15*i+1))=0;
end
for i=1:15
t(i,(15+i))=2;
t((136-i),(121-i))=2;
end
for i=16:120
t(i,(i+15))=1;
t((136-i),(121-i))=1;
end
U=inv(t)*A

Accepted Answer

Yao Li
Yao Li on 15 Apr 2013
The dimention of Matrix A is 1*135 and the dimention of inv(t) is 135*135. I don't think it's Ok for inv(t)*A. I'm not sure what you really want, but try
U=inv(t)*A'

More Answers (0)

Categories

Find more on Sparse Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!