Matlab function to compute an approximation to the temperature at any point

بسم الله الرحمن الرحيم

إخواني هل ممكن حد يأكدلي إذا حلي صحيح ولا لا ؟

السؤال

الحل الي مو متأكدة منة …


 
[CENTER]x=1;
y=5;
w=2;
h=3;
Calc = 0;
nTerms = 4; % or 5 or 6 or ...
for iTerm = 1 : nTerms
TempCalc = (2/pi())*((((-1)^(iTerm+1))+1)/iTerm)*sin((iTerm*pi()*x)/w)*(sin(h))*(iTerm*pi()*y/w)/(sin(h))*(iTerm*pi()*h/w)
Calc = Calc + TempCalc
end[/center]

لا استطيع فهم الكود جيدا

الكود كالتالي
syms H W
x=
y=
for n=1:1:4
flux(n)=((-1^(n+1))+1)(sin(npix/W))(sinh(npiy/W))/(nsinh(npiH/W))
total flux =2/pi
sum(flux,n)
end

ربما كان هناك بعض الاخطاء الاملائية في اخر كود الملف المرفق يحتوي على برنامج جديد ومجرب

مشكور ولكني ما فهمت الكود الي فالملف المرفق مالمقصود منة ؟ وبخصوص المشاركة رقم 3 عندما عرفت

Syms W H لم تعطيهم قيمة صح ؟ انا هذا كودي

x=input(‘Enter the value of x=’)
y=input(‘Enter the value of y=’)
w=input(‘Enter the value of w=’)
h=input(‘Enter the value of h=’)
if((x>w) & (y>h))
msgbox(‘x cannot exceed the value of w’)
msgbox(‘y cannot exceed the value of h’)
return
else
Calc = 0;
nTerms = 4; % or 5 or 6 or …
for iTerm = 1 : nTerms
TempCalc = (2/pi)((((-1)^(iTerm+1))+1)/iTerm)sin((iTermpix)/w)(sinh(iTermpiy/w))/(sinh(iTermpi*h/w))
Calc = Calc + TempCalc
end
end;

طريقة صحيحة … لاغبار عليها
اذا قرأت الملف فهو صحيح ايضا