Search for question
Question

Write a live script AVG(X) which calculates the average of a column vector of any size. Create a vector which is the integers from 1 to 100. Also use the Excel “Average” function to get the average . Use your live script function to find the average. See below data for T (temp) vs time. Newton’s law of cooling says for a body cooling in an ambient T of Ta, dT dt = -k(T- T a ) Ta, T are in C, t is in minutes, and k is in min-1. Say T0 = 80 C and Ta = 20 C. The T vs time data is given on the spreadsheet. Using central difference calculate the derivate at 5, 10, 15 and 20 minutes Using forward difference calculate the derivate at 0 Using backward difference calculate the derivate at 25 minutes Evaluate k at the same time steps. (Just use Excel) make a plot of T vs time … and k vs We have a function f x = (x+ e -x - x 2 ) 4+ 3 x Create a live script function for this (MATLAB) Make a Table of f(x) vs x from 1 to 10 using your function Use the trapezoidal rule on Excel to calculate the integral from 1 to each entry Plot the integral vs x Curve fit the f(x) vs x plot with an exponential function and report the constants Integrate the equation in “e” by hand ( analytically) and enter the values from that analytical function in another column Use MATLAB to integrate the data (from part b) using the trapz function built in to MATLAB. (use help feature to investigate how on MATLAB (its very easy .. just create vectors x and y containing the data and say trapz(x,y). Use MATLAB to integrate the function itself . This is a little more difficult as you need to create the function, then integrate it. Again use the help feature to see how by searching “quadrature” in MATLAB