Plotting complementary error function with 2 variables
Show older comments
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)
Answers (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 Comments
Zaineb Mohamed
on 7 Nov 2022
Edited: Zaineb Mohamed
on 7 Nov 2022
KSSV
on 7 Nov 2022
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
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
