Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %%TANKO 1
- clear all; close all; clc;
- rho = 7.9; %kg/dm3
- d = 0.04; %dm
- L = [4.11 4.35 4.73 4.88 4.95]; %dm
- m = pi*(d/2).^2*L*rho;
- T = [31.6 35.3 42.0 44.5 46.3]; %ms
- kayra = @(x,m)x(1)*m+x(2);
- sovitus = lsqcurvefit(kayra, [0 0], m, T);
- hold on
- plot(m,T)
- plot(m,kayra(sovitus, m))
- hold off
- %%TANKO 2
- clear all; close all; clc;
- l = 4.35; %dm
- rho = 7.9; %kg/dm3
- d = [0.03 0.04 0.05 0.06 0.08]; %dm
- m = pi*(d/2).^2*l*rho;
- T = [45.6 35.3 27.0 24.3 18.4]; %ms
- kayra = @(x,m) (x(1)./m).^0.5+x(2);
- sovitus = lsqcurvefit(kayra, [0 0], m, T);
- plot(m,T, 'ro')
- hold on
- plot(m,kayra(sovitus,m))
- hold off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement