Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am attempting to solve this problem. Here is the code that I have thus far. L=

ID: 3881228 • Letter: I

Question

I am attempting to solve this problem. Here is the code that I have thus far.

L=5; W=10; x=linspace(0,L,8); y = linspace(0,W,6); N=15; T1=80; T2=180;


T = ones(length(y),length(x));
n = 1;
wxy = 0;
s = 0;

for i = 1:(length(y)) %LOOP THROUGH ROWS
for j = 1:(length(x))%LOOP THROUGH COLUMNS
for k = 1:N % LOOP THROUGH "N" TIMES TO EVALUATE SUMMATION
s = s + (2/n)*(sin(((n*pi*x(j))/L))*((sinh(n*pi*(y(i)/L)))/(sinh((n*pi*W)/L))));
n = n + 2;
end
n = 1;
wxy = (2/pi)*s;
T(i,j) = (T2-T1)*wxy+T1;
end
wxy = 0;
s = 0;
end
  
disp(T);

This is the output that I am getting:

80 80 80 80 80 80 80 80
80 80.333 80.933 81.682 82.43 83.031 83.364 83.364
80 81.266 83.546 86.388 89.231 91.511 92.777 92.777
80 84.495 92.564 102.6 112.63 120.7 125.19 125.19
80 96.713 125.42 160.01 194.59 223.3 240.01 240.01
80 176.72 277.26 379.21 481.16 581.69 678.42 678.42

This is the output I should be getting:

80 80 80 80 80 80 80 80

80 80.333 80.6 80.748 80.748 80.6 80.333 80

80 81.266 82.28 82.843 82.843 82.28 81.266 80

80 84.495 88.069 90.032 90.032 88.069 84.495 80

80 96.713 108.71 114.58 114.58 108.71 96.713 80

80 173.62 180.88 183.64 183.64 180.88 173.62 80

Explanation / Answer

L=5; W=10; x=linspace(0,L,8); y = linspace(0,W,6); N=15; T1=80; T2=180;


T = ones(length(y),length(x));
n = 1;
wxy = 0;
s = 0;

for i = 1:(length(y)) %LOOP THROUGH ROWS
for j = 1:(length(x))%LOOP THROUGH COLUMNS
for k = 1:N % LOOP THROUGH "N" TIMES TO EVALUATE SUMMATION
s = s + (2/n)*(sin(((n*pi*x(j))/L))*((sinh(n*pi*(y(i)/L)))/(sinh((n*pi*W)/L))));
n = n + 2;
end
n = 1;
wxy = (2/pi)*s;
T(i,j) = (T2-T1)*wxy+T1;

wxy = 0;

s = 0;
end

end

disp(T)