input sine wave for 3 seconds

1 回表示 (過去 30 日間)
Cameron Aldred
Cameron Aldred 2017 年 3 月 23 日
回答済み: Star Strider 2017 年 3 月 23 日
I am trying to simulate a 1DOF structure response to an earthquake (sine wave) input using ode45.
I can input: earthquake = A*sin(w*t), but how do I make this equal zero after a certain time has passed? i.e. 3 seconds. And then see how the structure response dissipates after the sine wave (earthquake) has stopped?
Thanks a lot :)

回答 (1 件)

Star Strider
Star Strider 2017 年 3 月 23 日
You can probably do this by simply thresholding with respect to time. This creates a discontinuity, so multiplying it by a second sine curve with a period of 6 seconds (to give a more gradual envelope) would likely work best. It would also be best to give your ODE a ‘tspan’ vector of discrete times rather than a two-element range.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by