How to set up a function

2 ビュー (過去 30 日間)
Christian Neumann
Christian Neumann 2021 年 5 月 28 日
編集済み: Torsten 2021 年 5 月 29 日
Hi, how am I supposed to get the function working and typed in Matlab?
All of the variables are known except for V(t')dt'. This one should be integrated in a 200 seconds (t) period.
Well, I got some experience with coding but I really got no idea how to start with this. Thanks in advance!

回答 (2 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 5 月 28 日
Hi,
There are a few built-in functions of integral in MATLAB, such as int() - symbolic, integral(), quad() - numerical integration.
Or you can write your own code of mid-point, Trapezoidal, or other methods.
One important point here is the expression of V has to be pre-defined.
Good luck.

Torsten
Torsten 2021 年 5 月 28 日
編集済み: Torsten 2021 年 5 月 29 日
Differentiating your equation with respect to t gives the differential equation
V'(t) = Qdot/(m*R_s*T) * V(t)
with solution
V(t) = V0*exp(Qdot/(m*R_s*T) * t)
With this explicit function definition for V, you can easily plot it.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by