Term
|
Definition
(@function,xo) xo is an initial guess Note: xo could be a range (eg. [0 3]) |
|
|
Term
|
Definition
10 values for the 5th column |
|
|
Term
solve for the following using MATLAB: y= x^5 + 3x^3 - 2*x^2 + 3 when y = 0, x = ? |
|
Definition
|
|
Term
Write a short MATLAB script (program) that uses a while loop to divide the variable x by 2 until the value of x is less than 1.0e-6. The program should also count the number of times x was divided by 2. Before starting the while loop set x = 1. |
|
Definition
x = 1; i = 0; while x >=1e-6 x = x/2; i = i + 1; end
|
|
|
Term
(7 pts) Write a MATLAB function m-file called prob5 that requires two input vectors x and y (with the same number of elements) and outputs two scalar values a and b, where a is the intercept and b is the slope from linear least-squares regression. Use the MATLAB polyfit command to determine a and b inside your function |
|
Definition
function [a, b] = prob5(x, y) p = polyfit(x, y, 1); b = p(1); a = p(2);
|
|
|
Term
(6 pts) Use your function from question 5) above to fit data given in vectors x and y to a power-law of the form: Assume that x and y have been entered already in the MATLAB command window. Just write out the required statements to compute A and B using your function prob5. |
|
Definition
[a, b] = prob5(log10(x), log10(y)) B = b A = 10^a
|
|
|
Term
If x = [1 2 3 4] and y = [0 1 4 9]. Write a MATLAB program that will determine the coefficients for polynomial interpolation (i.e., the polynomial that passes through the data points exactly). |
|
Definition
|
|