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

You need at least three points (xi,yi) of the function
y = A*cosh(B*x)+ C
to estimate A, B and C.

댓글을 달려면 로그인하십시오.

답변 (0개)

질문:

2018년 11월 4일

댓글:

2018년 11월 5일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by