запущен проект motor identification c терминалкой
This commit is contained in:
10
Inu_im_1wnd_3lvl/extra.m
Normal file
10
Inu_im_1wnd_3lvl/extra.m
Normal file
@@ -0,0 +1,10 @@
|
||||
% Данные
|
||||
x = [0.1; 0.2; 0.3; 0.4; 0.5];
|
||||
y = [0.0130993528; 0.00648460863; 0.00379571458; 0.00300260726; 0.00203630934];
|
||||
y = y + 0.0019364;
|
||||
% Экспоненциальная аппроксимация: y = a * exp(-b*x)
|
||||
logY = log(y);
|
||||
p = polyfit(x, logY, 1); % ln(y) = ln(a) - b*x
|
||||
a = exp(p(2));
|
||||
b = -p(1);
|
||||
y0 = a % при x=0: y = a
|
||||
Reference in New Issue
Block a user