Plotting complementary error function with 2 variables
显示 更早的评论
I am tryimg to plot complementary error function for two variables but it keeps giving me empty figure. Here is my code:
T0 = 100;
T1 = 70;
c = 1;
u = @(x,t) (T0-T1)*erf(x./(2*c*sqrt(t)))+T0;
fsurf(u)
回答(2 个)
T0 = 100;
T1 = 70;
c = 1;
x = linspace(-1,1) ; % define your range
t = linspace(0,10) ; % define your range
[x,t] = meshgrid(x,t) ;
u = (T0-T1)*erf(x./(2*c*sqrt(t)))+T0;
surf(x,t,u)
2 个评论
Zaineb Mohamed
2022-11-7
编辑:Zaineb Mohamed
2022-11-7
KSSV
2022-11-7
You need to provide some upper limit.....with this you cannot plot.
T0 = 100;
T1 = 70;
c = 1;
t = linspace(1,10,20);
syms x
u = (T0-T1)*erf(x./(2*c*sqrt(t)))+T0;
fplot(u,[1 10])
you can try using fplot function
类别
在 帮助中心 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

