코드 확인하고 행렬 관계
8 views (last 30 days)
Show older comments
joonyoung Go
on 17 Nov 2019
Answered: Mahesh Taparia
on 20 Nov 2019
올린 파일과 아래의 코드가 맞는지 궁금합니다.행렬간의 관계에 대하여 알고 싶습니다.
qo=3900
a=0.13.*10.^(-7)
k=0.456
x=0.01
Ti=25
t=0:1:1000
T=2.*qo.*(sqrt(a.*t./pi)./k).*exp(-x.^2./(4.*a.*t))-qo.*x./k.*erfc(x./(2.*sqrt(a.*t)))+Ti
plot(t,T)
올린 파일과 위의 코드가 맞는지 궁금합니다.
0 Comments
Accepted Answer
Mahesh Taparia
on 20 Nov 2019
Hi Joonyoung
As per your code, you are ploting T(t) with x=0.01. You are correct if you want to plot at constant value of x which is 0.01 in your case.
But if you want to plot T(x,t), then you should vary x and t both. Consider the below code:
qo=3900
a=0.13.*10.^(-7) ;
k=0.456 ;
x=0:0.01:10; %% Varying x with t
Ti=25 ;
t=0:1:1000 ;
T=2.*qo.*(sqrt(a.*t./pi)./k).*exp(-x.^2./(4.*a.*t))-qo.*x./k.*erfc(x./(2.*sqrt(a.*t)))+Ti;
plot3(t,x,T)
Korean Version (Using Google Translate):
안녕 준영
코드에 따라 x = 0.01로 T (t)를 플로팅합니다. 귀하의 경우 0.01의 상수 값 x로 플롯하려면 올바른 것입니다.
그러나 T (x, t)를 플로팅하려면 x와 t를 모두 바꿔야합니다. 아래 코드를 고려하십시오.
qo=3900
a=0.13.*10.^(-7) ;
k=0.456 ;
x=0:0.01:10; %% t에 따라 x가 변함
Ti=25 ;
t=0:1:1000 ;
T=2.*qo.*(sqrt(a.*t./pi)./k).*exp(-x.^2./(4.*a.*t))-qo.*x./k.*erfc(x./(2.*sqrt(a.*t)))+Ti;
plot3(t,x,T)
0 Comments
More Answers (0)
See Also
Categories
Find more on Assembly in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!