+1-415-670-9189
info@expertsmind.com
Find the integral of a function at an arbitrary location
Course:- MATLAB Programming
Reference No.:- EM13465




Assignment Help
Expertsmind Rated 4.9 / 5 based on 47215 reviews.
Review Site
Assignment Help >> MATLAB Programming

1. We want to find the integral of a function at an arbitrary location x from the origin.  Thus,

2403_find the integral of a function at an arbitrary location.png

where I(x=0) is the value of the integral for all times less than 0.  (Essentially, I(x=0) is the unknown constant of integration or the initial condition.)  From the class lecture on the trapezoidal rule for numerical integration, it can be seen that this function can be approximated by

52_find the integral of a function at an arbitrary location1.png

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule.  Your function should accept two vectors as inputs, x and f.  The first vector (x) contains the independent variable data (the points at which the values of the function are known.  The second vector (f) should contain the values of the function at the points provided in the first vector.  Your function should return the integral of f with respect to x, as a function of x.

2.  The mass of the spring-mass-damper system shown below was initially displaced by 1 meter to the right and then released. The subsequent acceleration of the mass was measured using an accelerometer; this data is contained in the file smd_data.txt posted on the class web site. The file contains ascii data which provides the acceleration of the mass as a function of time; the first column of data in the file is time in seconds, the second column is the acceleration in meters/sec2. We wish to determine the maximum compressive force experienced by the spring during the time range provided in the data.  The spring force is equal to the spring rate times the displacement,  Fspring = kx.

1788_find the integral of a function at an arbitrary location2.png

Write a script file which will determine the displacement of the mass as a function of time from the acceleration data.  Trapezoidal integration will provide sufficient accuracy to infer the position and velocity of the seat as a function of time.  Your program should plot the position of the mass as a function of time.  You can use this plot to estimate the maximum negative displacement of the mass; the maximum compressive force is this displacement times the spring rate (k = 100 N/m).

 3.  We wish to numerically perform the following integration: 

1175_find the integral of a function at an arbitrary location3.png

(a) Use Matlab's quad function to perform the above integral.

(b) Analytically evaluate the integral (e.g. do the integration by hand).




Put your comment
 
Minimize


Ask Question & Get Answers from Experts
Browse some more (MATLAB Programming) Materials
We have discussed Dijkstra's algorithm in class for computing the shortest paths from any source node to all other nodes in a network. The first step is to codify the netwo
ENG318 Project - Design the circuit and select the appropriate components for that circuit to fulfill the requirements of the device and Verify your design by MATLAB simulatio
Find the transformation matrix T02, i.e. T defining {0} with respect to {2}. Learn how to compute the inverse of T20 to get this. Verify that this works by using tranimate
Biological ly Inspired Methods + Ma tlab Assignmen t,  Define a problem of your choice which can be tackled by Biologically Inspired Methods. The problem must satisfy the
Define a function that takes as input parameters a function handle f, start, and end values a and b, and a number of steps n. The function should compute and return the aver
Compare your filter with that given by the Matlab function ‘bilinear' for the same conditions. Manually design a second order digital filter, with the damping ratio given in t
Write a short Matlab (or whatever language you prefer) program to perform 2 point Gauss integration of a function f over a given interval (a, b). Inputs: a, b, and the funct
create an animation of a square according to the directions below. Create a square with a side length of 3 with the square centered at (5,5). Translate this square along a cos