Answered step by step
Verified Expert Solution
Question
1 Approved Answer
help plot acceleration Vs time in matlab. below are the given codes. %code function Xt=LumpFun(t,X) Xt=zeros(2,1); c=1.0; k=2.0; m=5.0; F=0.; %what would X(3) be needs
help plot acceleration Vs time in matlab. below are the given codes.
%code
function Xt=LumpFun(t,X) Xt=zeros(2,1); c=1.0; k=2.0; m=5.0; F=0.; %what would X(3) be needs to equal acceleration - acceleration is the %second derivitave of velocity Xt(2)=-(c/m)*X(2)-(k/m)*X(1)+(F/m); %Velocity Xt(1)=X(2); %Displacement end
X_init=[1,0]; t_min=0; t_max=50; t_range=[t_min, t_max]; [t,X]=ode45(@LumpFun, t_range, X_init); % plot to get acceleration vs time
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started