필터 지우기
필터 지우기

Plot infinite series for displacement function

조회 수: 1 (최근 30일)
Milad Ahmed
Milad Ahmed 2019년 2월 20일
답변: Agnish Dutta 2019년 2월 26일
Hello all, I am having trouble plotting this infinite series. I only need to plot for the first 5 values of j or so and the values of t from 0 to 0.9 for example. Wherever x is, I need it as L/2 i.e. to calculate the deflection at mid-span.
P = 250; %Concentrated point load of 250 kN
L = 5; % Span length
x = L/2; % Mid-span
E = 200*10^6; % Young's Modulus in kPa
J = 4.5*10^-5; % Moment of intertia for rectangular section
% with width 0.2m and depth 0.3m
V0 = (2*P*L^3)/(pi^4*E*J);
V0Actual = 1000*V0; %V0 in mm
c = 25; % speed in m/s (90 km/h)
w = (pi*c)/L;
for t = [0,1,100]
for j = 0:5
vxt = V0Actual*((1/j^4)*sin((j*pi*x)/L)*sin(j*w*t));
end
end
plot(vxt, t)

답변 (1개)

Agnish Dutta
Agnish Dutta 2019년 2월 26일
From what I understand, you want to calculate the value of v(x, t) for the first 5 values of j for the instances t = 0 - 0.9, and then plot v(x, t) against t.
The following modifications should be able to achieve that:
t = 0:0.1:0.9;
vxt_values = [];
for i = 0:0.1:0.9
vxt = 0;
for j = 1:5
vxt = vxt + V0Actual*((1/j^4)*sin((j*pi*x)/L)*sin(j*w*i));
end
vxt_values(end + 1) = vxt;
end
plot(t, vxt_values);
The plot fucntions required the x axis variable as the first argument, and the y axis variable as the second.
Refer to the following:
https://www.mathworks.com/help/matlab/ref/plot.html

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by