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!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by