フィルターのクリア

heat equation for infinite bar(rod)

2 ビュー (過去 30 日間)
Nicoleta
Nicoleta 2015 年 1 月 8 日
コメント済み: Torsten 2015 年 1 月 9 日
%Ecuatia caldurii pt bara infinita function ec_cald_bara_infin a=0;b=50;L=10;T=15;Ns=20;M=50;N=50;t=linspace(0,T,50); x=linspace(0,10,50); c=linspace(a,10,b); s=linspace(0,10,50); %calcul Y for n=1:N for m=1:M
Y=f(s).*exp(-( x(n)-s).^2/(4*a*a*t(m))); y=f(s); l=length(y) z=exp(-( x(n)-s).^2/(4*a*a*t(m))); p=length(z) D=Y.*z; r=length(c)
q=trapz(D,c);
%calcul u(t,n)
A=1/(2*a*sqrt(pi*t(m)));
w=length(A)
u(m,n)=A.*q;
end
end
figure(1) surf(t,x,u'); figure(2) for m=1:M plot(x,u(m,:))
axis([-L,L,min(min(u)), max(max(u))]);
film(m)=getframe; end movie(film,3,40); function f=f(s) f=s.*(L-s); end end
I tried figuring out this problem and all I managed to do is this code. Is it correct?
  1 件のコメント
Torsten
Torsten 2015 年 1 月 9 日
I see the code, but from the title of your request, I can't deduce the problem.
Best wishes
Torsten.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by