Why there is a single output for the value c?
1 view (last 30 days)
Show older comments
Recently I would like to plot a figure about concentration with respect to time, but not similar to exercises before I did, in the figure only a straight line can be obtained and one c value, instead of a matrix of c value, can be got. So I am confused what happened with my coding? Could anyone recognize and point out for me? Thank you so much! The coding is shown as follows:
function c = AS_BTC(t)
t = 0:100:36000;
Daq = 1e-9;
v = 9.37e-6;
aL = 6.7e-3;
C0 = 20;
n = 0.32;
Cbg = 0;
Dl = Daq * n + aL * v;
x = 0.25;
c = Cbg + (C0 - Cbg)/2 * erfc((x - v * t)/(2 * sqrt(Dl * t)));
plot(t,c);
end
0 Comments
Answers (1)
Walter Roberson
on 6 Oct 2015
c = Cbg + (C0 - Cbg)/2 * erfc((x - v * t) ./ (2 * sqrt(Dl * t)));
0 Comments
See Also
Categories
Find more on Data Acquisition Toolbox Supported Hardware 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!