Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

heat equation for infinite bar(rod)

2 visualizaciones (últimos 30 días)
Nicoleta
Nicoleta el 8 de En. de 2015
Cerrada: Sabin el 15 de Mayo de 2025
%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 comentario
Torsten
Torsten el 9 de En. de 2015
I see the code, but from the title of your request, I can't deduce the problem.
Best wishes
Torsten.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by