Professional Documents
Culture Documents
OmkarSatheFYMD1914 - Poisson's Eqn
OmkarSatheFYMD1914 - Poisson's Eqn
Class-FYME-Design
Sub-Lab Practice
Roll No.-FYMD1914
Poisson’s Equation
clc;
clear;
tb=input('\n Enter the bottom temperature:');
tt=input('\n Enter the top temperature:');
tl=input('\n Enter the left temperature:');
tr=input('\n Enter the right temperature:');
s=input('\n Enter f(x,y):','s');
f=inline(s);
l=input('\n Enter length:');
w=input('\n Enter height:');
h=input('\n Enter h:');
nofxdata=l/h+1;
nofydata=w/h+1;
a=zeros(nofxdata,nofydata);
for i=2:1:nofydata-1
a(i,1)=tl;
a(i,nofxdata)=tr;
end
for j=2:1:nofxdata-1
a(1,j)=tt;
a(nofydata,j)=tb;
end