How to plot a symbolic function with an intergral

For a class project we have to determine the quantity of a drug present in the blood stream after t, hours. We know that the rate of release of the drug is in the form of the equation a*e^(-b*t). The example values we are given are c = 100, a = 8, b=0.1, but these need to be changeable.
This is my work so far,
We were also given this information
Does anyone know how I can plot this?

 採用された回答

Birdman
Birdman 2018 年 3 月 15 日

0 投票

Try this:
syms f(t) tf
c=100;a=8;b=0.1;
f(t)=a*exp(-b*t);
F(tf)=c-int(f(t),t,0,tf);
tf=0:0.01:100;
plot(tf,F(tf))

その他の回答 (1 件)

Torsten
Torsten 2018 年 3 月 15 日

0 投票

a=8;
b=0.1;
c=100;
q=@(tf)c-a/b*(1-exp(-b*tf));
tf=0:0.1:1;
plot(tf,q(tf));

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

質問済み:

2018 年 3 月 15 日

回答済み:

2018 年 3 月 15 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by