can any one solve this ?

์กฐํšŒ ์ˆ˜: 32 (์ตœ๊ทผ 30์ผ)
KAREEM
KAREEM 2020๋…„ 6์›” 1์ผ
๋Œ“๊ธ€: Kirollos hany 2020๋…„ 6์›” 2์ผ
A small scale model of a passenger car can be represented by the simple mass supported by a spring and a damper as shown in Fig. Q2. The vertical motion of this system can be described by the following ordinary differential equation: ๐’Ž๐’…๐Ÿ๐’™๐’…๐’•๐Ÿ+๐’„๐’…๐’™๐’…๐’•+๐’Œ๐’™=๐ŸŽ
where x = displacement from equilibrium position (m), t = time (s), m =mass (kg) and c = the damping coefficient (N ยท s/m) and k = spring constant (N/m). The mass is 20 kg. The spring constant k = 20 N/m. The initial velocity (dx/dt) is zero, and the initial displacement x = 0.5 m.
The damping coefficient c takes on three values of 5 (underdamped), 40 (critically damped), and 200 (overdamped).
A- Write and execute a computer code using โ€˜Octave platformโ€™ to solve this equation over the time period 0 โ‰ค t โ‰ค 5 s for the underdamped and overdamped cases.
B- Plot the displacement (x) and velocity (dx/dt) versus time for the under damped and overdamped cases for the whole time period.
C- Compare the results using different time steps for the underdamped case only.

๋‹ต๋ณ€ (1๊ฐœ)

Paresh yeole
Paresh yeole 2020๋…„ 6์›” 1์ผ
m = 20; % kg
k = 20; %N/m
x_0 = 0.5; %m
c1 = 5; %underdamped
c2 = 40; % critically damped
c3 = 200; %overdamped
syms x(t)
Dx = diff(x,t);
Dx2 = diff(x,t,2);
ode = m*Dx2+c1*Dx+k*x == 0;
ode1 = m*Dx2+c3*Dx+k*x == 0
cond1 = x(0) ==0.5;
cond2 = Dx(0) == 0;
conds = [cond1 cond2];
xSol(t) = dsolve(ode,conds);
xSol1(t) = dsolve(ode1,conds);
for t=1:5
dist(t) = eval(xSol(t));
dist1(t) = eval(xSol1(t));
end
The above code will help you complete the second and third question
  ๋Œ“๊ธ€ ์ˆ˜: 4
James Tursa
James Tursa 2020๋…„ 6์›” 1์ผ
Maybe the OP couldn't find anyone to do the homework for him on the Octave forum, so he came here ...
Kirollos hany
Kirollos hany 2020๋…„ 6์›” 2์ผ
we are in coronaaaaaaaa

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Programming์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

Community Treasure Hunt

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

Start Hunting!

Translated by