How to slove it (using matlab)
조회 수: 2 (최근 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
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
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!