clear all;
clc;
close all;
t=[1:8 10 15];
L=[10,17,18,25,28,30,30,33,36,38];
disp('Data by part a');
C=polyfit(t,L,1);
disp('Length at 3.5 is');
polyval(C,3.5)
disp('Length at 13 is');
polyval(C,13)
xx=1:0.1:15;
figure;
plot(xx,polyval(C,xx),t,L,'o');
title('Part a');
disp('Data by part b');
C=polyfit(t,log(L),1);
a=exp(C(2));
b=C(1);
f=@(x) a*exp(b*x);
disp('Length at 3.5 is');
f(3.5)
disp('Length at 13 is');
f(13)
xx=1:0.1:15;
figure;
plot(xx,f(xx),t,L,'o');
title('Part b');
USING MATLAB. For given data, estimate the length when time is at 3.5 seconds and at...
10Calculiated Dta Time in seconds Tme in seconds The following represents pressure samples in pounds per square inch (psi) taken in a fuel line from 1 to 10 seconds 5. Press re126., 27-128.2- 29.0 (psi) 29.8-T 30.6-31,1 31.3 31.0-30.5 a. Fit a first degree polynomial, a second degree polynomial and a third degree polynomial to this data. Plot the curves along with the data points. Use the result from part a to predict the pressure at 9.323sec, using all three...
Using Matlab.
The following calibration data are from a hot wire anemometer (HWA) velocity measurement system for air flow: Air Velocity, V (m/s) HWA Output Voltage (E) 0.0 1.100 1. 1.1 1.362 2. 1.431 1.5 3. 1.487 2.0 4. 1.535 2.5 5. 1.576 6 3.0 1.647 4.0 7. 1.706 8. 5.0 1.780 9. 6.5 1.841 10. 8.0 1.910 10 11. 1.983 12. 13 13. 16 2.072 14. 20 2.159 15. 25 2.257 16. 32 2.379 17. 40 2.500 1. Perform...
I want -C parts- using matlab
2. The population of the world for selected years from 1750 to 2009 is given in the following table: Year Population (millions) 1750 791 1800 980 1850 1,260 1900 1.650 1950 2,520 1990 5,270 2000 6,060 2009 6,800 (a) Determine the exponential function that best fits the data. Use the function to estimate the population in 1980. Make a plot of the points and the function. (b) Curve-fit the data with a third-order polynomial....
Using MatLab A. Create a time array t from -10 to 10 seconds with a sample rate of 1 sec. B. Create a step function of t with a user-entered delay. C. Plot the array showing only the samples.
**********************matlab code please*******************
1. Interpolation error of polynomial fit Using 11 equi-distributed points (10 equal segments) in the interval [-1 1], Using Newton's form find and plot the interpolating polynomial p(x) for the function f(x) -1/(125x2). Comment on the large discrepancies between p(x) and the function f(x) that the data came from Write down an expression for the error in the interpolating polynomial above? Which part of the expression is responsible for the large errors observed?
1. Interpolation error of...
1. (25 pts) Given the
following start for a Matlab function: function [answer] =
NewtonForm(m,x,y,z) that inputs • number of data points m; •
vectors x and y, both with m components, holding x- and
y-coordinates, respectively, of data points; • location z; and uses
divided difference tables and Newton form to output the value of
the Lagrange polynomial, interpolating the data points, at z.
1. (25 pts) Given the following start for a Matlab function: function [answer] NewtonForm(m.x.yz) that...
please solve using matlab
4. Nonlinear Regression Fit the below data with the following curve-fit equation y bi (ebr + 2 1.0000 1.5431 3.7622 10.0677 27.3082 Define a function of the sum of squared residuals (fSSR) as a function of the regression coefficients, b's. Minimize the fSSR function and determine the regression coefficients. Guess what would be the built-in math function to generate the original data? Plot the function in the existing figure with a smooth dashed line, calculate the...
Using MATLAB,
The following data is given: 13 14 15 15 2 10 12 (a) Use linear least-squares regression to determine the coefficients m and b in the function y - mx+b that best fits the data (b) Make a plot that shows the function and the data points.
In MATLAB
At time t=0 when a rocket's engine shuts down, the rocket has reached an altitude of 500 m and is rising at a velocity of 125 m/s. The height of the rocket as a function of time is 9.8 h(t)= t? +125t+500 for t > 0 2 Create a time array t from O sec to 30 sec with an increment of 1 sec and a corresponding array for the height h. Plot the height of the rocket...
Matlab:
a) Write a program to compute the first-degree and third-degree
polynomials that fit the data, displaying the polynomial
coefficients. Remember to include text to describe the displayed
coefficients.
(b) Compute and display (including what the information is) the
sum of the squares for each curve fit.
(c) Plot the data and the two curve fits on a
single plot, for 101 values of A in the range 0 ?
A ? 9. Choose different line styles for each curve...