Question

In: Computer Science

Create a GUI matlab code that computes for the position, velocity, and acceleration of the equation...

Create a GUI matlab code that computes for the position, velocity, and acceleration of the equation and displays their respective graph.

Solutions

Expert Solution

Hello dear student..your question looks a bit incomplete because you have not specified which equation to use or something like that. So as far as i understood, i have given you the answer of finding velocity , position and acceleration at different time intervals and displaying their respective graphs.

Do hit LIKE if you find the answer useful because that shows your love and support which motivates us. If you have any doubts, do ask in the comments below :-

Here starts your code :-

clear all
close all
clc
% initialize time interval
k = 1;
% define time vector
t = 0:k:10;
% define acceleration vector
a = [0,2,4,7,11,17,24,32,41,48,51];
% calculate the velocity
v = cumtrapz(t,a);
d = cumtrapz(t,v);
% display a table of the velocity values
tv = table(t(:),v(:),'VariableNames',{'Time_Sec' 'Velocity_mps'})
% display a table of the displacement values
td = table(t(:),d(:),'VariableNames',{'Time_Sec' 'Displacement_m'})
%plot graph of the change of the acceleration with time
plot(t,a)
title('Acceleration against time Graph')
xlabel('Time(Sec)')
ylabel('Acceleration(m/s^2)')
%plot graph of the change of the velocity with time
figure(2)
plot(t,v)
title('Velocity against time Graph')
xlabel('Time(Sec)')
ylabel('Velocity(m/s)')
%plot graph of the change of the displacement with time
figure(3)
plot(t,d)
title('Displacement against time Graph')
xlabel('Time(Sec)')
ylabel('Displacement(m)')

Thankyou!


Related Solutions

write a matlab code to find the following: initial position, initial velocity, and acceleration using the...
write a matlab code to find the following: initial position, initial velocity, and acceleration using the algorithm and information below time(seconds). height(m) velocity(m/s) 0. 0.2. 2.95 algorithm: 1. Enter data in to arrays. 2. Fit the height data to a 2nd order polynomial. 3. Evaluate the polynomial at enough points to get a smooth curve. 4. Find the velocity model by taking derivative of the height polynomial. 5. Evaluate the velocity polynomial at enough times to get a smooth curve
Matlab code please 6. Find the velocity, acceleration, and speed of a particle with the given...
Matlab code please 6. Find the velocity, acceleration, and speed of a particle with the given position function. (a) r(t) = e t cos(t)i+e t sin(t)j+ tetk t = 0 (b) r(t) = 〈t 5 ,sin(t)+ t 2 cos(t),cos(t)+ t 2 sin(t)〉, t = 1
Write a simple matlab program to model the position, velocity, and acceleration over time of Ruchardt's...
Write a simple matlab program to model the position, velocity, and acceleration over time of Ruchardt's experiment as a harmonic oscillator.
1) Find the velocity and position vectors of a particle that has the given acceleration and...
1) Find the velocity and position vectors of a particle that has the given acceleration and the given initial velocity and position. a(t) = 7i+ 4j,    v(0) = k,    r(0) = i 2) Find the tangential and normal components of the acceleration vector. r(t) = 5(3t − t3) i + 15t2 j
Derive the equations to find the position, velocity, and acceleration in simple harmonic motions.
Derive the equations to find the position, velocity, and acceleration in simple harmonic motions.
I need an original matlab code and gui for a simple double pendulum. This needs to...
I need an original matlab code and gui for a simple double pendulum. This needs to be original and not too complicated. Please provide basic instructions. Thank you!
Find the velocity, acceleration, and speed of a particle with the given position function. r(t) =...
Find the velocity, acceleration, and speed of a particle with the given position function. r(t) = 2 cos(t), 2t, 2 sin(t)
Find the velocity, acceleration, and speed of a particle with the given position function. r(t) =...
Find the velocity, acceleration, and speed of a particle with the given position function. r(t) = 9 cos(t), 8 sin(t) v(t) = a(t) = |v(t)| = Sketch the path of the particle and draw the velocity and acceleration vectors for t = π 3 .
Suppose that a particle has the following acceleration vector and initial velocity and position vectors. a(t)  ...
Suppose that a particle has the following acceleration vector and initial velocity and position vectors. a(t)  =  7 i  +  9t k,    v(0)  =  4 i  −  j,    r(0)  =  j  +  5 k (a) Find the velocity of the particle at time t. (b) Find the position of the particle at time t.
This is a Matlab Exercise problem. Please create the Matlab code and figure for the following...
This is a Matlab Exercise problem. Please create the Matlab code and figure for the following problem using problem specifications: Plot x vs y when y=sin(x), y=cos(x), y=sin (2*x), and y=2*sin(x) when x = 1:0.1:10. Use 2 by 2 subplot, sin(x) is in location 1, cos(x) is in location 2, sin(2*x) is in location 3 and 2*sin(x) is in location 4. The plot should have: (1) x label = ‘x value’, y label = ‘y value’, legend ‘y=sin(x)’,’ y=cos(x)’,’ y=sin...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT