Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function crank(L,tau,k,K)
- x=linspace(-L/2,L/2,K);
- xp=L/K;
- Tl=(L^2)/(8*k);
- t=linspace(0,5*Tl,K);
- a=(k*tau)/xp^2;
- o=[];
- for b=1:K
- C(b,b)= 2*(1+a);
- D(b,b)=2*(1-a);
- end
- for f=1:K-1
- C(f,f+1)=-a;
- D(f,f+1)=a;
- end
- for h= 2:K
- C(h,h-1)=-a;
- D(h,h-1)=a;
- end
- M=C\D;
- for q= 1:K
- T(1,q)=exp(-(x(1,q)^2)/((.1*L)^2));
- end
- for martin=1:K
- j=M^martin;
- Fr=j*T;
- R(1,martin)=Fr;
- end
- imagesc(R)
- D
- C
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement