GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Write a script that includes (at bottom) any functions you w…

Write a script that includes (at bottom) any functions you write (if any) and that uses Linear Regression to  fit a line onto the given data fit a cubic (degree 3) polynomial onto the given data report results as discussed below plot results as discussed below Description of data:  the x variable is displacement.  The y variable is force for a “stiffening spring” that stiffens as it displaces.  It is not exactly linear in the force vs. displacement.  Let’s find out. Things to report.  Sum of squares of residuals (from mean) Sum of squares of residuals (from line fit) Sum of squares of residuals (from cubic fit) coefficient of determination (line) coefficient of determination (cubic) Things to plot Raw data, use ‘o’ Show y average, use ‘r’ Show the linear fit line, use ‘g’ Show the cubic fit line, use ‘b’ Data  (cut and paste this data) x data (independent) 56789101112131415161718192021222324252627282930 y data (dependent) 812.07968.251128.11305.21459.71625.81825.520592212.92414.62569.62903.23035.63319.23436.43904.24168.84241.64635.24809.45336.15592.55950.46067.964437411.3            

Read Details

What is the following code doing?   global DEBUG;DEBUG=true;…

What is the following code doing?   global DEBUG;DEBUG=true;A=[ 1    -8     2; …     5     2     6; …     6    -4     4];b=[ 13; …    -6; …    14];P = [ 0, 0, 1;      1, 0, 0;      0, 1, 0 ];A = P*A;b = P*b;n = 3;debug_mat(“A: “, A);debug_mat(“b: “, b);C = A;for k=1:n    C(k,k) = 0;    x(k,1) = 0;    epsilon_a(k,1) = 1;endfor k=1:n    C(k,1:n) = C(k,1:n)/A(k,k);        d(k) = b(k)/A(k,k);enddebug_mat(“x: “, x);debug_mat(“C: “, C);debug_mat(“d: “, d);show = [‘No! ‘; ‘Yes!’];% from book, Fig 12.2, es=0.00001% is 0.0000001% called the ‘stop criterion’book_es = 0.0000001;for iter=1:50    % an nx1 column vector; should b zeros!    e = A*x – b;      % Griffis Method:  a little looser bound; cheat a little here    % this is also nx1 column vector of “err” bounds    err = ((n+1)*abs(A)*abs(x)+abs(b))*eps;    err_subm = (norm(A,1)*norm(x,1)+norm(b,1))*eps;        % important tests!  UNDERSTAND what these say.    x_is_floating_pt_valid = norm(e,1) ‘, repmat(‘%8.16f ‘, 1, n), ‘\n’];    fprintf(“%s\n”, entry);     fprintf(fmt1, A’);     fprintf(“\n”);end

Read Details

Say is the square matrix,

Say is the square matrix,

Read Details

This question concerns the coefficient of determination, of…

This question concerns the coefficient of determination, of a linear regression of some raw data that is thought to depend on some raw data.  Consider that any fit we try to do gives an improvement over the straight average of the data.  How is bounded?

Read Details

Say you have two equations

Say you have two equations

Read Details

Iterative Methods—non-Linear ——————————-…

Iterative Methods—non-Linear ————————————–  

Read Details

Gauss-Seidel can easily solve for a vector

Gauss-Seidel can easily solve for a vector

Read Details

Say we perform a linear least squares fit on the log of dat…

Say we perform a linear least squares fit on the log of data such that and we know the constants .  What would be the “power fit” equivalent?

Read Details

Iterative methods—Linear ———————————–…

Iterative methods—Linear ———————————–  

Read Details

What is the precise interpretation of a number in the struct…

What is the precise interpretation of a number in the structure matrix of the discriminant analysis output? 

Read Details

Posts pagination

Newer posts 1 … 45,477 45,478 45,479 45,480 45,481 … 67,222 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top