Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %Uppgift 3, Anton Hagelberg och Filip Johansson, fjäderkonstanter
- clear all; clc; close all;
- k = [5300,163000]';
- kn = 0;
- tol = 1e-6;
- error = [tol*2,tol*2]';
- ck = 0.7;
- NR = [k(1),k(2)]';
- cs = 1;
- n = 1;
- while error(:,n) > tol
- F = transfer_functions(k(1),k(2),ck,cs);
- J = Jacobian_transfer_functions(k(1),k(2));
- kn = k - J\F;
- k = kn;
- NR = [NR, k];
- error = [error, abs(NR(:,n+1) - NR(:,n))];
- n = n + 1;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement