numerical integration to obtain response using convolution

1 次查看(过去 30 天)
%% 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!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Acoustics, Noise and Vibration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by