How to slove it (using matlab)

1 次查看(过去 30 天)
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 个评论
Dyuman Joshi
Dyuman Joshi 2023-1-25
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?

请先登录,再进行评论。

采纳的回答

Luca Ferro
Luca Ferro 2023-1-25
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')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by