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

조회 수: 1 (최근 30일)
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
  댓글 수: 2
Jan
Jan 2013년 4월 15일
We cannot try to solve the problem, when all we know is "something is wrong".
omer
omer 2013년 4월 15일
thank you, I solved my problem

댓글을 달려면 로그인하십시오.

채택된 답변

Yao Li
Yao Li 2013년 4월 15일
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'

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by