I want to plot this equation P(t)=P(0)*e^rt.

6 次查看(过去 30 天)
I want to plot this equation P(t)=P(0)*e^rt. considering P(0) is p nought.
  3 个评论
Ibrahim Bin Umair
Ibrahim Bin Umair 2021-6-12
No sir the values are not known. Only known for r.
John D'Errico
John D'Errico 2021-6-12
If P0 is not known, then what can you plot, since this is explicitly a function of P0.

请先登录,再进行评论。

回答(1 个)

Mouhamed Niasse
Mouhamed Niasse 2021-6-12
xlim1=0; xlim2=10;
r=1; P0=1;
% I supposed you will define r and P(0) as constants, and the limits xlim1
% and xlim2 are known:
t=linspace(xlim1,xlim2);
P=P0*exp(r*t);
plot(t,P)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by