Question

1. Use polyfit to find a 4rd degree polynomial to fit the following set of data:...

1. Use polyfit to find a 4rd degree polynomial to fit the following set of data:

Value = -4:1:5; Vibration = [-507.6, -261.88, -100.03, -38.08, 6.9, 7.53, 15.6, 51.8, 182, 428.97].

Plot the best fitting curve and the data points on the same figure.

2. Given that a= [1 0 2] and b=[0 2 2] determine the values of the following expressions.

(a) a~=b

(b) a<b

(c) a<b<a

(d) a<b<b

(e) (a|~a)

(f) b&(~b)

(g) a(~(~b))

(h) a=b==a

(i) ~a<=b

(j) a>b&a<0

Homework Answers

Answer #1

I have implemented the Task 1 and Task 2 per the given description.

Please find the following Code Screenshot, Output, and Code.

ANY CLARIFICATIONS REQUIRED LEAVE A COMMENT

Task 1:

1.CODE SCREENSHOT :

2.OUTPUT :

3.CODE :

%Given Data
Value = -4:1:5; 
Vibration = [-507.6, -261.88, -100.03, -38.08, 6.9, 7.53, 15.6, 51.8, 182, 428.97];
%fit a fourth degree polynomial 
fit=polyfit(Value,Vibration,4);
%plot the original and fitted data
plot(Value,Vibration,'O',Value,polyval(fit,Value));
xlabel('Value');
ylabel('Vibration');

Task 2:

Create the two vectors

(a) a~=b

a~=b return 0 if both are equal and 1 if both elements are not equal

(b) a<b

a<b return true(1) when the value in 'a' is lessthan value in 'b'

(c) a<b<a

(d) a<b<b

(e) (a|~a)

This is logical or with negation of itself which is always true

(f) b&(~b)

This is logical and with negation of itself which is always false

(g) a(~(~b))

(h) a=b==a

(i) ~a<=b

(j) a>b&a<0

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
Curve-Fit Function USING MATLAB Using the top-down design approach, develop a MATLAB function A8P2RAlastname.m that reads...
Curve-Fit Function USING MATLAB Using the top-down design approach, develop a MATLAB function A8P2RAlastname.m that reads data from a file and performs regression analysis using polyfit and polyval. The function shall have the following features: The input arguments shall include the file name (string), a vector of integers for the degrees of polynomial fits to be determined, and an optional plot type specifier (‘m’ for multiple plots, ‘s’ for a single plot - default). The data files will be text...
Use MATLAB to find the best a, b, and c coefficients for curve y=a*(sqrt(x)/x)+bx+c to fit...
Use MATLAB to find the best a, b, and c coefficients for curve y=a*(sqrt(x)/x)+bx+c to fit these data points: (x,y)=[(0.1 2.5) (1.2 1.64) (2.1 1.67) (3.35 1.81) (4.5 1.9)] Use fprintf to show the a,b,c values you obtained, also plot the points and fitted curve in one plot (use proper labels.)
Fit a curve for the following data. Fit a curve for the following data. x 1...
Fit a curve for the following data. Fit a curve for the following data. x 1 2 3 4 5 6 7 8 9 10 f(x) 1.5 1.75 2 2.25 2.5 275 3 3.25 3.5 3.75
1. Find the Taylor polynomial, degree 4, T4, about 1/2 for f (x) = tan-inv (x)...
1. Find the Taylor polynomial, degree 4, T4, about 1/2 for f (x) = tan-inv (x) and use it to approximate tan-inv (1/16). 2. Find the taylor polynomial, degree 4, S4, about 0 for f (x) = tan-inv (x) and use it to approximate tan-inv (1/16). 3. who provides the best approximation, S4 or T4? Prove it.
Find the curve of best fit of the type y = aebx to the following data...
Find the curve of best fit of the type y = aebx to the following data by the method of Least Squares. x 1 5 7 9 12 y 10 15 12 15 21
2) A table with diffusion rate data. Diffusion rate behavior follows the following mathematical form: D...
2) A table with diffusion rate data. Diffusion rate behavior follows the following mathematical form: D = D0 exp(-Q/RT) Diffusion Rate Data Temp (oC) 1/T Diffusion Coeff (m2/s) 977 0.0008 4.00E-13 855 0.00089 6.00E-14 722 0.00101 3.50E-15 636 0.0011 3.40E-16 a) Create a semi-log (base 10) plot of creep strain as a function of 1/T, again making sure to appropriately label and scale your data and graph. Label the figure and axes and provide the bestfit line, equation, and R2...
1. Use the roster method to describe the elements of the following set. x∈ℤ||x−3|<12 and x...
1. Use the roster method to describe the elements of the following set. x∈ℤ||x−3|<12 and x is a multiple of 3 2. Use the roster method to describe the elements of the following set. {n∈ℕ∣∣∣1n+6⩾6272 and n is a multiple of 5} 3. Determine the cardinality of the following sets. {x∈ℤ|−4⩽x⩽3}: {x∈ℕ|−4⩽x⩽3}: 4. Evaluate the following expressions. [Hint: start by factoring the polynomial.] ∣∣{x∈ℚ∣∣18x3+69x2+56x=0}∣∣= ∣∣{x∈(0,∞)∣∣18x3+69x2+56x=0}∣∣= ∣∣{x∈ℤ∣∣18x3+69x2+56x=0}∣∣= 5.  Evaluate the following expressions. [Hint: start by factoring the polynomial.] ∣∣{x∈ℝ∣∣x4+11x2+28=0}∣∣= ∣∣{x∈ℚ∣∣x4+11x2+28=0}∣∣= ∣∣{x∈ℕ∣∣x4+11x2+28=0}∣∣= 6....
You are given the following data set: {(0,0), (0.5,0.6), (1,0.9), (1.1, 1), (1.5, 1.7)}, where the...
You are given the following data set: {(0,0), (0.5,0.6), (1,0.9), (1.1, 1), (1.5, 1.7)}, where the first coordinate is the independent (explanatory) variable, and the second coordinate is the dependent variable. (a) Find a best fit model if the model is restricted to just be a constant (i.e. the best fit line has slope 0). (b) What is the mean squared error of (a)? (c) What is the mean squared error of the model that has y-intercept 0 and slope...
Fit the data in the table to the following equations to get values for a and...
Fit the data in the table to the following equations to get values for a and b for each equation using least-squares. Which equation is a better fit? Why? Provide evidence to support your answers. X 0 20 50 65 150 Y 0.381 0.264 0.18 0.151 0.086 1. y = a + bx 2. y = a + bx + cx? 3. y = 1+bax
Consider the following set of sample data, and find the following (note: if you are using...
Consider the following set of sample data, and find the following (note: if you are using TI 83 to find these values, you need to write down the formulas that you should have used) 19 12 9 19 0 4 3 14 5 5 24 2 5 7 17 (a). Mean (b). Median (c). Mode (d). Standard Deviation (e). Variance (f). Find the z-score for 14. (i). Construct a Box-whisker plot for the data (j). Construct a frequency distribution Table....
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT