Info
此问题已关闭。 请重新打开它进行编辑或回答。
I need help understanding this test file and how to use the modified secant method with it. Can someone explain what a(1) is referring to? and how can i use modified secant?
1 次查看(过去 30 天)
显示 更早的评论
% This program is to test the Modified Secant for systems of equations
% section of your function.
h1 = @(a) a(1) + a(2) - 2;
h2 = @(a) a(1)*a(3) + a(2)*a(4);
h3 = @(a) a(1)*(a(3)^2) + a(2)*(a(4)^2) - 2/3;
h4 = @(a) a(1)*(a(3)^3) + a(2)*(a(4)^3);
handles = {h1, h2, h3, h4};
c_and_x_init = [0.5, -2, -0.25, 0.25];
% Should converge to
% c_and_x = [1, 1, 0.577350269189, -0.577350269189]
% or
% c_and_x = [1, 1, -0.577350269189, 0.577350269189]
c_and_x_final = KahunaB_Lab4(handles, c_and_x_init, 0.0000001)
1 个评论
John D'Errico
2024-9-30
You need to write the code to do modifed secant mathod. Surely that was discussed in class. So look in your notes. Or look online.
Surely you can find a link for pseudo-code for modified secant method. In fact, if you look, I'd bet you can find MATLAB code.
a is assumed to be a vector of length 4. a(1) refers to the FIRST element of a. If this is a surprise to you, then you strongly NEED to spend time doing the MATLAB Onramp tutorial.
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!