numerical integration to obtain response using convolution

1 回表示 (過去 30 日間)
Shubham
Shubham 2021 年 3 月 12 日
コメント済み: Shubham 2021 年 3 月 15 日
%% Question - I have to integrate this expression symbollically such that the final answer is a function of ta
%% because I have to plot response v\s ta , but I am getting a symbollic expression
syms ta tau
m = 2;
wn=707.10678;
wd = 707.10236;
z=0.003535;
F = -8.492 -18.92 *cos(ta*4) + -7.036e-14 *sin(ta*4) + -11.03*cos(2*ta*4) + -8.148e-13*sin(2*ta*4)+-9.687 *cos(3*ta*4) + -7.713e-13 *sin(3*ta*4) + -9.277*cos(4*ta*4) + -6.027e-13*sin(4*ta*4)+-4.587 *cos(5*ta*4) + 5.084*sin(5*ta*4);
response = 1/(m*wd)int(F*exp(-z*wn(ta-tau))sin(wd(ta-tau)),tau,0,ta);
pretty(response)
subs(response,3.5) %% Tried finding the value at ta = 3.5
%% plot response at some 4-5 valuse of ta

採用された回答

Alan Moses
Alan Moses 2021 年 3 月 15 日
The code attached produces an error due to missing multiplication operators. You may replace the line 10 of your code where the 'response' variable is calculated with the below line:
response = 1/(m*wd)*int(F*exp(-z*wn*(ta-tau))*sin(wd*(ta-tau)),tau,0,ta);
You may also check out the vpa function that substitutes the value of 3.5 to the ‘response’ symbolic expression. You may use the following line of code:
vpa(subs(response,3.5))
Hope this helps!
  1 件のコメント
Shubham
Shubham 2021 年 3 月 15 日
Very helpful now I am able to plot

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAcoustics, Noise and Vibration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by