-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjacobian.m
100 lines (92 loc) · 32 KB
/
jacobian.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
function [J] = jacobian(retr_code,k, h, den, ap_355, ap_532, ap_1064, x, i)
%JACOBIAN
for m = 1
if retr_code == 1
J(m,m,m) = (((ap_355(m,3)*ap_355(m,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+1,m) = (((ap_355(m+1,3)*ap_355(m+1,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+1,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+2,m) = (((ap_355(m+2,3)*ap_355(m+2,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+2,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+3,m) = (((ap_355(m+3,3)*ap_355(m+3,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+3,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m+1,m,m) = ((ap_355(m,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+1,m) = ((ap_355(m+1,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+1,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+2,m) = ((ap_355(m+2,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+2,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+3,m) = ((ap_355(m+3,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+3,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
elseif retr_code == 2
J(m,m,m) = (((ap_532(m,3)*ap_532(m,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m,m+1,m) = (((ap_532(m+1,3)*ap_532(m+1,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+1,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m,m+2,m) = (((ap_532(m+2,3)*ap_532(m+2,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+2,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m,m+3,m) = (((ap_532(m+3,3)*ap_532(m+3,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+3,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+1,m,m) = ((ap_532(m,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+1,m+1,m) = ((ap_532(m+1,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+1,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+1,m+2,m) = ((ap_532(m+2,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+2,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+1,m+3,m) = ((ap_532(m+3,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+3,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
elseif retr_code == 3
J(m,m,m) = (((ap_355(m,3)*ap_355(m,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+1,m) = (((ap_355(m+1,3)*ap_355(m+1,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+1,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+2,m) = (((ap_355(m+2,3)*ap_355(m+2,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+2,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+3,m) = (((ap_355(m+3,3)*ap_355(m+3,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+3,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m+1,m,m) = ((ap_355(m,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+1,m) = ((ap_355(m+1,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+1,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+2,m) = ((ap_355(m+2,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+2,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+3,m) = ((ap_355(m+3,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+3,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+2,m,m) = (((log((((x(m,k,i)+h)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/(((x(m,k,i)+h)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1)))))-(log((((x(m,k,i)-h)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/(((x(m,k,i)-h)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1))))))/den)/(2*h);
J(m+2,m+1,m) = (((log(((x(m,k,i)*ap_355(m,1))+((x(m+1,k,i)+h)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+((x(m+1,k,i)+h)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1)))))-(log(((x(m,k,i)*ap_355(m,1))+((x(m+1,k,i)-h)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+((x(m+1,k,i)-h)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1))))))/den)/(2*h);
J(m+2,m+2,m) = (((log(((x(m,k,i)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+((x(m+2,k,i)+h)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+((x(m+2,k,i)+h)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1)))))-(log(((x(m,k,i)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+((x(m+2,k,i)-h)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+((x(m+2,k,i)-h)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1))))))/den)/(2*h);
J(m+2,m+3,m) = (((log(((x(m,k,i)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+((x(m+3,k,i)+h)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+((x(m+3,k,i)+h)*ap_532(m+3,1)))))-(log(((x(m,k,i)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+((x(m+3,k,i)-h)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+((x(m+3,k,i)-h)*ap_532(m+3,1))))))/den)/(2*h);
elseif retr_code == 4
J(m,m,m) = (((ap_532(m,3)*ap_532(m,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m,m+1,m) = (((ap_532(m+1,3)*ap_532(m+1,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+1,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m,m+2,m) = (((ap_532(m+2,3)*ap_532(m+2,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+2,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m,m+3,m) = (((ap_532(m+3,3)*ap_532(m+3,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+3,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+1,m,m) = ((ap_532(m,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+1,m+1,m) = ((ap_532(m+1,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+1,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+1,m+2,m) = ((ap_532(m+2,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+2,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+1,m+3,m) = ((ap_532(m+3,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+3,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+2,m,m) = ((((x(m,k,i)+h)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/((x(m,k,i)+h)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2)))-(((x(m,k,i)-h)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/((x(m,k,i)-h)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2))))/(2*h);
J(m+2,m+1,m) = (((x(m,k,i)*ap_532(m,2)+(x(m+1,k,i)+h)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+(x(m+1,k,i)+h)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2)))-((x(m,k,i)*ap_532(m,2)+(x(m+1,k,i)-h)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+(x(m+1,k,i)-h)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2))))/(2*h);
J(m+2,m+2,m) = (((x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+(x(m+2,k,i)+h)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+(x(m+2,k,i)+h)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2)))-((x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+(x(m+2,k,i)-h)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+(x(m+2,k,i)-h)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2))))/(2*h);
J(m+2,m+3,m) = (((x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+(x(m+3,k,i)+h)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+(x(m+3,k,i)+h)*ap_1064(m+3,2)))-((x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+(x(m+3,k,i)-h)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+(x(m+3,k,i)-h)*ap_1064(m+3,2))))/(2*h);
elseif retr_code == 5
J(m,m,m) = (((ap_355(m,3)*ap_355(m,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+1,m) = (((ap_355(m+1,3)*ap_355(m+1,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+1,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+2,m) = (((ap_355(m+2,3)*ap_355(m+2,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+2,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+3,m) = (((ap_355(m+3,3)*ap_355(m+3,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+3,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m+1,m,m) = ((ap_355(m,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+1,m) = ((ap_355(m+1,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+1,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+2,m) = ((ap_355(m+2,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+2,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+3,m) = ((ap_355(m+3,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+3,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+2,m,m) = (((ap_532(m,3)*ap_532(m,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+2,m+1,m) = (((ap_532(m+1,3)*ap_532(m+1,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+1,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+2,m+2,m) = (((ap_532(m+2,3)*ap_532(m+2,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+2,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+2,m+3,m) = (((ap_532(m+3,3)*ap_532(m+3,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+3,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+3,m,m) = ((ap_532(m,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+3,m+1,m) = ((ap_532(m+1,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+1,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+3,m+2,m) = ((ap_532(m+2,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+2,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+3,m+3,m) = ((ap_532(m+3,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+3,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
elseif retr_code == 6
J(m,m,m) = (((ap_355(m,3)*ap_355(m,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+1,m) = (((ap_355(m+1,3)*ap_355(m+1,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+1,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+2,m) = (((ap_355(m+2,3)*ap_355(m+2,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+2,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m,m+3,m) = (((ap_355(m+3,3)*ap_355(m+3,4))*(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4)))-(ap_355(m+3,4)*(x(m,k,i)*ap_355(m,3)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,3)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,3)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,3)*ap_355(m+3,4))))/(x(m,k,i)*ap_355(m,4)+x(m+1,k,i)*ap_355(m+1,4)+x(m+2,k,i)*ap_355(m+2,4)+x(m+3,k,i)*ap_355(m+3,4))^2;
J(m+1,m,m) = ((ap_355(m,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+1,m) = ((ap_355(m+1,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+1,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+2,m) = ((ap_355(m+2,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+2,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+1,m+3,m) = ((ap_355(m+3,1)*(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2)))-ap_355(m+3,2)*(x(m,k,i)*ap_355(m,1)+x(m+1,k,i)*ap_355(m+1,1)+x(m+2,k,i)*ap_355(m+2,1)+x(m+3,k,i)*ap_355(m+3,1)))/(x(m,k,i)*ap_355(m,2)+x(m+1,k,i)*ap_355(m+1,2)+x(m+2,k,i)*ap_355(m+2,2)+x(m+3,k,i)*ap_355(m+3,2))^2;
J(m+2,m,m) = (((log((((x(m,k,i)+h)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/(((x(m,k,i)+h)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1)))))-(log((((x(m,k,i)-h)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/(((x(m,k,i)-h)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1))))))/den)/(2*h);
J(m+2,m+1,m) = (((log(((x(m,k,i)*ap_355(m,1))+((x(m+1,k,i)+h)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+((x(m+1,k,i)+h)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1)))))-(log(((x(m,k,i)*ap_355(m,1))+((x(m+1,k,i)-h)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+((x(m+1,k,i)-h)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1))))))/den)/(2*h);
J(m+2,m+2,m) = (((log(((x(m,k,i)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+((x(m+2,k,i)+h)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+((x(m+2,k,i)+h)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1)))))-(log(((x(m,k,i)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+((x(m+2,k,i)-h)*ap_355(m+2,1))+(x(m+3,k,i)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+((x(m+2,k,i)-h)*ap_532(m+2,1))+(x(m+3,k,i)*ap_532(m+3,1))))))/den)/(2*h);
J(m+2,m+3,m) = (((log(((x(m,k,i)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+((x(m+3,k,i)+h)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+((x(m+3,k,i)+h)*ap_532(m+3,1)))))-(log(((x(m,k,i)*ap_355(m,1))+(x(m+1,k,i)*ap_355(m+1,1))+(x(m+2,k,i)*ap_355(m+2,1))+((x(m+3,k,i)-h)*ap_355(m+3,1)))/((x(m,k,i)*ap_532(m,1))+(x(m+1,k,i)*ap_532(m+1,1))+(x(m+2,k,i)*ap_532(m+2,1))+((x(m+3,k,i)-h)*ap_532(m+3,1))))))/den)/(2*h);
J(m+3,m,m) = (((ap_532(m,3)*ap_532(m,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+3,m+1,m) = (((ap_532(m+1,3)*ap_532(m+1,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+1,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+3,m+2,m) = (((ap_532(m+2,3)*ap_532(m+2,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+2,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+3,m+3,m) = (((ap_532(m+3,3)*ap_532(m+3,4))*(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4)))-(ap_532(m+3,4)*(x(m,k,i)*ap_532(m,3)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,3)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,3)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,3)*ap_532(m+3,4))))/(x(m,k,i)*ap_532(m,4)+x(m+1,k,i)*ap_532(m+1,4)+x(m+2,k,i)*ap_532(m+2,4)+x(m+3,k,i)*ap_532(m+3,4))^2;
J(m+4,m,m) = ((ap_532(m,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+4,m+1,m) = ((ap_532(m+1,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+1,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+4,m+2,m) = ((ap_532(m+2,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+2,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+4,m+3,m) = ((ap_532(m+3,1)*(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2)))-ap_532(m+3,2)*(x(m,k,i)*ap_532(m,1)+x(m+1,k,i)*ap_532(m+1,1)+x(m+2,k,i)*ap_532(m+2,1)+x(m+3,k,i)*ap_532(m+3,1)))/(x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))^2;
J(m+5,m,m) = ((((x(m,k,i)+h)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/((x(m,k,i)+h)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2)))-(((x(m,k,i)-h)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/((x(m,k,i)-h)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2))))/(2*h);
J(m+5,m+1,m) = (((x(m,k,i)*ap_532(m,2)+(x(m+1,k,i)+h)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+(x(m+1,k,i)+h)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2)))-((x(m,k,i)*ap_532(m,2)+(x(m+1,k,i)-h)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+(x(m+1,k,i)-h)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2))))/(2*h);
J(m+5,m+2,m) = (((x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+(x(m+2,k,i)+h)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+(x(m+2,k,i)+h)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2)))-((x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+(x(m+2,k,i)-h)*ap_532(m+2,2)+x(m+3,k,i)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+(x(m+2,k,i)-h)*ap_1064(m+2,2)+x(m+3,k,i)*ap_1064(m+3,2))))/(2*h);
J(m+5,m+3,m) = (((x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+(x(m+3,k,i)+h)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+(x(m+3,k,i)+h)*ap_1064(m+3,2)))-((x(m,k,i)*ap_532(m,2)+x(m+1,k,i)*ap_532(m+1,2)+x(m+2,k,i)*ap_532(m+2,2)+(x(m+3,k,i)-h)*ap_532(m+3,2))/(x(m,k,i)*ap_1064(m,2)+x(m+1,k,i)*ap_1064(m+1,2)+x(m+2,k,i)*ap_1064(m+2,2)+(x(m+3,k,i)-h)*ap_1064(m+3,2))))/(2*h);
end
end
end