Hello, I genuinely need some help with my code. I am trying to plot the solution of a differential equation over an interval but it won't run.
t= 0:0.1:10; %This is the interval I need
concentration= 1.* exp(-1.*t) %This is the equation C(t)= C0* e^-kt
The initial condition is C=C0 at t=0
c0= 1 and k=1
I need to plot C(t) vs. t from 0 to 10 seconds . Please help me figure out this code.

 採用された回答

Voss
Voss 2023 年 1 月 15 日
編集済み: Voss 2023 年 1 月 15 日

0 投票

t= 0:0.1:10; %This is the interval I need
concentration= 1.* exp(-1.*t); %This is the equation C(t)= C0* e^-kt
plot(t,concentration)

その他の回答 (0 件)

カテゴリ

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

製品

質問済み:

2023 年 1 月 15 日

編集済み:

2023 年 1 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by