Newton-Raphson interpolation with model
显示 更早的评论
Hello! I have a problem with Newton-Raphsons method interpolating with my model Acosh(Bx) + C. I need to find A, B and C using Newton Raphson but i'm just confused with the setup of the matrices. Here's the code:
Guess = [1,1,1];
A=Guess(1);
B=Guess(2);
C=Guess(3);
x=1;
i=1; % counter
du=1; % to get inside loop
while abs(du) > 1e-01
A=Guess(1);
B=Guess(2);
C=Guess(3);
F1 = A*cosh(B*x) + C;
F2 = A*cosh(B*x) + C;
F3 = A*cosh(B*x) + C;
Fm1 = [F1 F2 F3]';
J1 = cosh(B*x); %d/dA
J2 = A*x*sinh(B*x); %d/dB
J3 = 1; %d/dC
Jacobi = [J1 J2 J3]';
du = Jacobi\Fm1;
Guess = Guess-du;
i= i+1
end
Any info is appreciated. :)
1 个评论
Torsten
2018-11-5
You need at least three points (xi,yi) of the function
y = A*cosh(B*x)+ C
to estimate A, B and C.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Newton-Raphson Method 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!