필터 지우기
필터 지우기

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 CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by