The horizontal velocity of a body is given as a function of
The horizontal velocity of a body is given as a function of time by
v(t) = -t2+4
a) Use the two-segment trapezoidal rule to find the distance covered from t=-1 to t=1 seconds.
b) Find the true error.
c) Find the absolute relative true error
This is for a MatLab test so i would have to write a function file.
Solution
clear all;
close all;
clc;
t=-1:0.01:1;
v=-t^2 +4;
plot(t,v);
x-label(\'time\');
y-label(\'velocity\');
title(\'distance\')
