How to get the absolute value of a function?

4 ビュー (過去 30 日間)
Jasper Postema
Jasper Postema 2015 年 10 月 11 日
編集済み: dpb 2015 年 10 月 11 日
So I have to make a plot and phase diagram of the damped oscillation equation:
d^2x/dt^2 + k*sqrt(abs(dx/dt)) + w^2 * x = A * cos(W * t)
So I made two functions fnf and fng, where
fnf = y
fng = - k * sqrt(abs(dx/dt)) - w^2 * x + A * cos(W * t).
Now the weird part is, when the k value of a normal damped oscillation becomes higher, it damps. However, if I increase the k value of the equation above, the graph goes down. So if k=0, the graph is bounded by y=5 and y=-5 (a cosine), if k>0, then the graph is bounded by y~5 and y<<-5. Am I doing something wrong, or is this actually correct? I used the EXACT same equations as above.
Personally, I think it is the abs(y) that is causing problems.

回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by