Repair the Matlab code.
Here is the code for this formula.
function res = cursova()
The LongG format.
and clear;
e = 1e-6
%--------------------------------------------------------------------------------
x_k = [0;0.5)
disp('-----Method with synchronous approximation----')
count = 0;
F = [f1dx1(x_k(1), x_k(2),1) f1dx2(x_k(1), x_k(2),1);
f2dx1(x_k(1), x_k(2),1) f2dx2(x_k(1), x_k(2),1)];
A = inv (F) is
x_next=x_k-(A*[f1(x_k(1), x_k(2), 1); f2(x_k(1), x_k(2), 1)]);
A_next=A*([2*[1 0;0 1]-[f1dx1(x_k(1),x_k(2),1) f1dx2(x_k(1),x_k(2),1);
f2dx1(x_k(1), x_k(2),1) f2dx2(x_k(1), x_k(2),1)]*A]);
count = count + 1
by disp(x_k)
disp(abs(f1(x_next(1), x_next(2),1)))
disp(abs(f2(x_next(1), x_next(2),1)))
while (norm(x_next-x_k,"inf") >=e)
A = A_Next
x_k = x_next
x_next=x_k-(A*[f1(x_k(1), x_k(2), 1); f2(x_k(1), x_k(2), 1)]);
A_next=A*([2*[1 0; 0 1]-[f1dx1(x_k(1),x_k(2),1) f1dx2(x_k(1),x_k(2),1);
f2dx1(x_k(1), x_k(2),1) f2dx2(x_k(1), x_k(2),1)]*A]);
count = count + 1
by disp(x_k)
disp(abs(f1(x_next(1), x_next(2),1)))
disp(abs(f2(x_next(1), x_next(2),1)))
Ends
disp(‘It is iteration :’)
by disp (count)
DSP (According to the approximate result)
by disp(x_k)
Dis(f1 (a) )
f1_x=f1(x_next(1), x_next(2),1)
Disp (abs (f1_x )
Disp ('f2(a)')
f2_x=f2 (x_next(1), x_next(2), 1)
Disp (abs (f2_x )
%--------------------------------------------------------------------------------
% first r-n system
function res = f1(x, y, fun)
If fun = 1
%rez = cos(1/3*(x-y)) 2*y;
res = 2*x-sin (0.5*x-0.5*y)
Other
%rez = cos(1/3*(x-y)) 2*y;
res = 2*x-sin (0.5*x-0.5*y)
Ends
Ends
% second r-n system
function res = f2 (x, y, fun)
If fun = 1
%rez = sin(1/3*(x+y)) 2*x;
res = 2*y-cos (0.5*x+0.5*y)
Other
% rez = sin(1/3*(x+y)) 2*x;
res = 2*y-cos (0.5*x+0.5*y)
Ends
Ends
% 1st r-n by x
function res = f1dx1 (x, y, fun)
If fun = 1
%rez = -1/3*sin(x-y)/3);
res = 2-(0.5*cos (0.5*x-0.5*y));
Other
% res = -1/3*sin(x-y)/3);
res = 2-(0.5*cos (0.5*x-0.5*y));
Ends
Ends
% 1st r-n by Y
function rez = f1dx2 (x, y, fun)
If fun = 1
% res = 1/3* (sin((x-y)/3)-6;
res = 0.5*cos (0.5*x-0.5*y)
Other
% res = 1/3* (sin((x-y)/3)-6;
res = 0.5*cos (0.5*x-0.5*y)
Ends
Ends
% 2nd r-n by x
function rez = f2dx1 (x, y, fun)
If fun = 1
% res = 1/3* (cos((x+y)/3)-6;
res = 0.5*sin (0.5*x+0.5*y)
Other
% res = 1/3* (cos((x+y)/3)-6;
res = 0.5*sin (0.5*x+0.5*y)
Ends
Ends
Percent of the 2nd r-n by Y
function rez = f2dx2 (x, y, fun)
If fun = 1
% res = 1/3*cos(x+y)/3);
res = 0.5*sin(0.5*x+0.5*y)+2;
Other
%rez = 1/3*cos(x+y)/3);
res = 0.5*sin(0.5*x+0.5*y)+2;
Ends
Ends
Ends
Need to be prescribed for this
-
452 5 0 I can do your task throughout the day. I’m happy to work together.
Current freelance projects in the category Desktop Apps
Modification in the emulator's operation
45 USD
Hello. I downloaded the Gaminator CF Final slot machine emulator from the Internet. I really liked it, but there are some issues. There is an admin panel, but it opens freely and cannot be closed at all. It only closes along with the application. Also, the data does not save… Desktop Apps ∙ 2 days 6 hours back ∙ 10 proposals |
Development of custom software (Android application + CMS) for SUNMI K2 self-service kiosks (Fast food)
22 USD
We are looking for an experienced team or a Middle/Senior Android developer (possibly with Full-stack skills) to create proprietary software for self-service kiosks for a fast food retail chain. Currently, our terminals operate on a ready-made cloud integrator, but we are… Content Management Systems, Desktop Apps ∙ 7 days 2 hours back ∙ 23 proposals |
It is necessary to migrate the current working program from FoxPro to C#.Hello everyone! We have a program in FoxPro (it has several modules, it's an accounting program), we have the source code of the program, and if necessary, we can consult with people who support the current program. What needs to be done: 1. Analyze how everything works,… C#, Desktop Apps ∙ 12 days 10 hours back ∙ 19 proposals |