How to slove it (using matlab)

2 visualizaciones (últimos 30 días)
Lokas Johnson
Lokas Johnson el 25 de En. de 2023
Respondida: Luca Ferro el 25 de En. de 2023
Given the displacement x(t):
x(t)=-2.41* 10-5 e-0.4607t sin (3.0003t)
0≤t≤ 20 with an increment 0.01 sec
a. Find the velocity v(t)
b. Using subplot, plot x(t) and v(t) Write the title and the x-axis and the y-axis titles. (Please i need her slove)
  1 comentario
Dyuman Joshi
Dyuman Joshi el 25 de En. de 2023
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start, I will ask you to look into sym; and how would you calculate velocity from displacement?

Iniciar sesión para comentar.

Respuesta aceptada

Luca Ferro
Luca Ferro el 25 de En. de 2023
Try this:
syms t
x= (-2.41* 10^5)*(exp((-0.4607*t)))*sin(3.0003*t); %position expression
v= diff(x); %speed as a first derivative of the position
time=0:0.01:20; %time vector
xsol= subs(x,t,time); %evaluates the expressions using the time vector
vsol=subs(v,t,time);
tiledlayout(2,1) %plots both of them
nexttile
plot (time,xsol)
title('Position')
nexttile
plot (time,vsol)
title('Speed')

Más respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by