Question

Write a function car(v_0, a,t) in MATLAB. The function returns the velocity and distance of a...

Write a function car(v_0, a,t) in MATLAB. The function returns the velocity and distance of a car based on parameters v_0, a and t. The Math equations are:

v_t=v_0+a*t;

s=v_0*t+1/2a*t2;

Homework Answers

Answer #1

code:

output :

raw_code :

function [v_t,s] = car(v_0,a,t)
%function to calculate velocity and distance
%based on given parameters
  
%given relations
v_t = v_0 + a*t;
s = v_0*t + (1/2)*a*(t^2);
endfunction

***do comment for queries and rate me up************

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
The position of a car as a function of time is given by x=(60m)+(−4.5m/s)t+(−9m/s2)t2. B. What...
The position of a car as a function of time is given by x=(60m)+(−4.5m/s)t+(−9m/s2)t2. B. What is the initial velocity of the car? C.What is the acceleration of the car? D.What distance does the car travel during the first 1.0 s? E.What is the average velocity of the car between t=1.0s and t=2.0s?
The position of a car as a function of time is given by x = (50...
The position of a car as a function of time is given by x = (50 m) + (-5.0 m/s) t + (-10 m/s2) t2. a. What are the initial position, initial velocity, and acceleration of the car? b. What distance does the car travel during the first 1.0 s? c. What is the average velocity of the car between t = 1.0 s and t = 2.0 s?
The position of a car as a function of time is given by x = (50...
The position of a car as a function of time is given by x = (50 m) + (-5.0 m/s) t + (-10 m/s2) t2. a. What are the initial position, initial velocity, and acceleration of car? Answer: initial position ______ m; initial velocity _____ m/s; acceleration ______ m/s2 b. What distance does the car travel during the first 1.0 s? Answer:_____ m c. What is the average velocity of the car between t = 1.0 s and t =...
IN MATLAB: Write a function file that takes a vector as an input and returns another...
IN MATLAB: Write a function file that takes a vector as an input and returns another vector with all repeated elements of the original vector. For example, the vector [3 4 1 0 4 -5 7 3] would return the vector [3 4]. Do not use the built-in function "repelem."
A Honda Civic travels in a straight line along a road. Its distance x from a...
A Honda Civic travels in a straight line along a road. Its distance x from a stop sign is given as a function of time t by the equation x(t)= α t2−β t3, where α = 1.52 m/s2 and β = 5.35×10−2 m/s3 Calculate the average velocity of the car for the time interval t=0 to t1 = 1.95 s . Calculate the average velocity of the car for the time interval t=0 to t2 = 4.05 s Calculate the...
your velocity is given by v(t)=t2+2 in m/sec, with t in seconds estimate the distance,s, traveled...
your velocity is given by v(t)=t2+2 in m/sec, with t in seconds estimate the distance,s, traveled between t=0 and t=5 use an overestimate with data one second the distance is approx______m
A car starts at t=0 with a velocity of 25 m/s. It drives with a constant...
A car starts at t=0 with a velocity of 25 m/s. It drives with a constant velocity for 1 minute, then it accelerates with a constant acceleration of 0.5 m/s^2 for 20 seconds, then it continues with a new constant velocity for 1 minute. Draw a graph of the velocity versus time. Calculate the total distance the car travels.
Using MATLAB Write a user-defined MATLAB function for the following math function: y(x)= (-0.2x^3 + 7x^2)e^-0.3x...
Using MATLAB Write a user-defined MATLAB function for the following math function: y(x)= (-0.2x^3 + 7x^2)e^-0.3x The input to the function is x and the output is y. Write the function such that x can be a vector (use element-by-element operations). (a) Use the function to calculate y(-1.5) and y(5). (b) Use the function to make a plot of the function y(x) for -2 ≤ x ≤ 6.
A Honda Civic travels in a straight line along a road. Its distance x from a...
A Honda Civic travels in a straight line along a road. Its distance x from a stop sign is given as a function of time t by the equation x(t)= α t2− β t3, where α = 1.48 m/s2 and β = 5.40×10−2 m/s3 Calculate the average velocity of the car for the time interval t=0 to t1=2.00 s . vv = nothing m/sm/s SubmitRequest Answer Part B Calculate the average velocity of the car for the time interval t=0...
The velocity function of a particle is given by v(t) = 3t2 – 24t + 36....
The velocity function of a particle is given by v(t) = 3t2 – 24t + 36. a) Find the equation for a(t), the acceleration. b) If s(1) = 50, find the displacement function s(t). c) When will the velocity be zero? d) Find the distance the particle travels on [0, 4].