You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
How to check the degree of parallelism
15 views (last 30 days)
Show older comments
How to check the degree parallelism of the result of intersecting planes in affine space (give the percentage of the parallelism) with tolerance to get an indicator of how much they are in the same orientation in the following case?
But from mathematical point of view not only commands.
The two objects that I want to check their parallelism are the intersecting object between plane 1 and plane 2 AND the intersected object between plane 1 and plane 3
the direction of two objects are expressed in terms of directions 1 and directions2
Note: the objects are intersecting in some points but I want an indicator that these two objects have almost the same directions!
P1=[396218721.065513 -205153846.153846 0 0 0 0
-205153846.153846 396218721.065513 -205153846.153846 0 0 0
0 -205153846.153846 396218721.065513 -205153846.153846 0 0
0 0 -205153846.153846 396218721.065513 -205153846.153846 0
0 0 0 -205153846.153846 396218721.065513 -205153846.153846
0 0 0 0 -205153846.153846 198109360.532757];
P2=[239737786.836378 -41030769.2307692 0 0 0 0
-41030769.2307692 239737786.836378 -205153846.153846 0 0 0
0 -205153846.153846 403860863.759455 -205153846.153846 0 0
0 0 -205153846.153846 403860863.759455 -205153846.153846 0
0 0 0 -205153846.153846 403860863.759455 -205153846.153846
0 0 0 0 -205153846.153846 201930431.879727];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq2=null([P2(2:6,:)-P2(1,:)])';
beq1=Aeq1*P1(1,:)';
beq2=Aeq2*P2(1,:)';
Aeq=[Aeq1;Aeq2];
beq=[beq1;beq2];
assert( rank([Aeq,beq])==rank(Aeq) , 'Hyperplanes do not intersect')
origin1 = pinv(Aeq)*beq
origin1 = 6×1
1.0e+04 *
-6.8832
8.1890
2.5987
-1.8223
-4.6515
-5.6221
directions1 = null(Aeq)
directions1 = 6×4
-0.1750 -0.3776 -0.5066 -0.5507
-0.5308 -0.2946 -0.1425 -0.0902
0.8120 -0.1800 -0.1745 -0.1725
-0.1258 0.8234 -0.2087 -0.2196
-0.0857 -0.1739 0.7699 -0.2493
-0.0718 -0.1730 -0.2374 0.7406
P3=[376176938.886082 -184638461.538462 0 0 0 0
-184638461.538462 376176938.886082 -205153846.153846 0 0 0
0 -205153846.153846 396692323.501467 -205153846.153846 0 0
0 0 -205153846.153846 396692323.501467 -205153846.153846 0
0 0 0 -205153846.153846 396692323.501467 -205153846.153846
0 0 0 0 -205153846.153846 198346161.750733];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq3=null([P3(2:6,:)-P3(1,:)])';
beq1=Aeq1*P1(1,:)';
beq3=Aeq3*P3(1,:)';
Aeq22=[Aeq1;Aeq3];
beq22=[beq1;beq3];
assert( rank([Aeq22,beq22])==rank(Aeq) , 'Hyperplanes do not intersect')
origin2 = pinv(Aeq22)*beq22
origin2 = 6×1
1.0e+06 *
-0.9104
1.3951
0.6253
-0.0096
-0.4236
-0.5618
directions2 = null(Aeq22)
directions2 = 6×4
-0.1807 -0.3839 -0.5148 -0.5587
-0.5343 -0.2872 -0.1249 -0.0708
0.8089 -0.1800 -0.1720 -0.1694
-0.1260 0.8228 -0.2098 -0.2208
-0.0831 -0.1746 0.7665 -0.2533
-0.0688 -0.1739 -0.2416 0.7357
4 Comments
Walter Roberson
on 16 Jul 2023
@M sorry, my relevant classes were pretty much 40 years ago.
Bruno Luong
on 22 Jul 2023
This is buggy
assert( rank([Aeq22,beq22])==rank(Aeq) , 'Hyperplanes do not intersect')
The correct should be (Aeq replaced by Aeq22)
assert( rank([Aeq22,beq22])==rank(Aeq22) , 'Hyperplanes do not intersect')
Answers (3)
Torsten
on 16 Jul 2023
The intersection of P1 and P2 is given by
x = origin1 + directions1*lambda
the intersection of P1 and P3 is given by
x = origin2 + directions2*mu
with arbitrary 4x1 vectors lambda and mu.
If the system
origin1 + directions1*lambda = origin2 + directions2*mu
has a solution for (lambda,mu), the two intersections cannot be parallel.
Let's try:
P1=[396218721.065513 -205153846.153846 0 0 0 0
-205153846.153846 396218721.065513 -205153846.153846 0 0 0
0 -205153846.153846 396218721.065513 -205153846.153846 0 0
0 0 -205153846.153846 396218721.065513 -205153846.153846 0
0 0 0 -205153846.153846 396218721.065513 -205153846.153846
0 0 0 0 -205153846.153846 198109360.532757];
P2=[239737786.836378 -41030769.2307692 0 0 0 0
-41030769.2307692 239737786.836378 -205153846.153846 0 0 0
0 -205153846.153846 403860863.759455 -205153846.153846 0 0
0 0 -205153846.153846 403860863.759455 -205153846.153846 0
0 0 0 -205153846.153846 403860863.759455 -205153846.153846
0 0 0 0 -205153846.153846 201930431.879727];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq2=null([P2(2:6,:)-P2(1,:)])';
beq1=Aeq1*P1(1,:)';
beq2=Aeq2*P2(1,:)';
Aeq=[Aeq1;Aeq2];
beq=[beq1;beq2];
assert( rank([Aeq,beq])==rank(Aeq) , 'Hyperplanes do not intersect')
origin1 = pinv(Aeq)*beq
origin1 = 6×1
1.0e+04 *
-6.8832
8.1890
2.5987
-1.8223
-4.6515
-5.6221
directions1 = null(Aeq)
directions1 = 6×4
-0.1750 -0.3776 -0.5066 -0.5507
-0.5308 -0.2946 -0.1425 -0.0902
0.8120 -0.1800 -0.1745 -0.1725
-0.1258 0.8234 -0.2087 -0.2196
-0.0857 -0.1739 0.7699 -0.2493
-0.0718 -0.1730 -0.2374 0.7406
P3=[376176938.886082 -184638461.538462 0 0 0 0
-184638461.538462 376176938.886082 -205153846.153846 0 0 0
0 -205153846.153846 396692323.501467 -205153846.153846 0 0
0 0 -205153846.153846 396692323.501467 -205153846.153846 0
0 0 0 -205153846.153846 396692323.501467 -205153846.153846
0 0 0 0 -205153846.153846 198346161.750733];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq3=null([P3(2:6,:)-P3(1,:)])';
beq1=Aeq1*P1(1,:)';
beq3=Aeq3*P3(1,:)';
Aeq22=[Aeq1;Aeq3];
beq22=[beq1;beq3];
assert( rank([Aeq22,beq22])==rank(Aeq) , 'Hyperplanes do not intersect')
origin2 = pinv(Aeq22)*beq22
origin2 = 6×1
1.0e+06 *
-0.9104
1.3951
0.6253
-0.0096
-0.4236
-0.5618
directions2 = null(Aeq22)
directions2 = 6×4
-0.1807 -0.3839 -0.5148 -0.5587
-0.5343 -0.2872 -0.1249 -0.0708
0.8089 -0.1800 -0.1720 -0.1694
-0.1260 0.8228 -0.2098 -0.2208
-0.0831 -0.1746 0.7665 -0.2533
-0.0688 -0.1739 -0.2416 0.7357
M = [-directions1, directions2];
rhs = origin1 - origin2;
lambdamu = pinv(M)*rhs;
lambda = lambdamu(1:4);
mu = lambdamu(5:8);
% Check that intersecting point lies in both affine spaces
intersecting_point_1 = origin1 + directions1*lambda
intersecting_point_1 = 6×1
1.0e+07 *
4.7633
1.1871
2.0525
0.2404
-1.6477
-1.9003
intersecting_point_2 = origin2 + directions2*mu
intersecting_point_2 = 6×1
1.0e+07 *
4.7633
1.1871
2.0525
0.2404
-1.6477
-1.9003
84 Comments
M
on 16 Jul 2023
Edited: M
on 16 Jul 2023
@Torsten I am interested only in the direction, I am sure that these intersecting object are parallel with very slight tolerance from the background of the problem(thay are not exactly parallel, there is slight difference on the orientation but they are very close and still I want to get how much they are parellel "perentage of parallelism), but I dont know how to prove it from mathematical point of view!
Also, could you please elaborate
If the system
origin1 + directions1*lambda = origin2 + directions2*mu
has a solution for (lambda,mu), the two intersections cannot be parallel.
?
Torsten
on 16 Jul 2023
Edited: Torsten
on 16 Jul 2023
I am sure that these intersecting object are parallel
This is contradictoy in itself.
Also, could you please elaborate
If the system
origin1 + directions1*lambda = origin2 + directions2*mu
has a solution for (lambda,mu), the two intersections cannot be parallel.
It means that if two affine subspaces have a common point, they cannot be parallel. And I don't know how you want to define "parallel" different from "non-intersecting" for arbitrary affine subspaces.
M
on 16 Jul 2023
Edited: M
on 16 Jul 2023
@Torsten I tested something in 3d space for the same problem and I found that they are intersected in some points, but still I want an indicitor that the these two objjects "directions1" and "directions2" are in the same direction but with a slight difference! can you help on this?
M
on 16 Jul 2023
Edited: M
on 16 Jul 2023
yes I used a wrong term, I want to get how much "Percante' that these objects are close to the same direction, but still they are parallel with small amount of tolerence, that's why we got intersecting points?
M
on 16 Jul 2023
Edited: M
on 16 Jul 2023
Do we consider that "directions1" and "directions2" subspaces?
Do you think that if the distance between the affine subspaces is small so they have the same orientation?
Also, is the distance an indicator of the orientation?
M
on 16 Jul 2023
@Torsten to understand me more, the following are the lines that I got from 3d intersectiong plane,
Because these are lines we can know how much they are in the same orientation.
But how to express that the "directions1" and "directions2" have the same direction???
I think the distance is not a good solution of the direction!
Torsten
on 16 Jul 2023
Edited: Torsten
on 16 Jul 2023
Do we consider that "directions1" and "directions2" subspaces?
Yes. A1 = origin1 + span(directions1) and A2 = origin2 + span(directions2) are the two affine subspaces you have to compare.
Do you think that if the distance between the affine subspaces is small so they have the same orientation?
"Orientation" is very spongy. Linear (affine) subspaces don't have what is called "orientation" in mathematics. According to the presentation, at least for two vector spaces of the same dimension, their "distance" is computed according to slides 10-14. I did not read further on how this concept is generalized for affine spaces of the same dimension.
Torsten
on 16 Jul 2023
Edited: Torsten
on 16 Jul 2023
According to page 14, considering only the subspaces spanned by "directions1" and "directions2", we get
[U,S,V] = svd(directions1.'*directions2) %slice 14
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:4))) %s slice 12 and slice 14
thus a very small distance (near to being "parallel").
But you will have to check the fact that you must compare affine spaces, not the spanning vector spaces.
From my feeling it should not make a difference, but you should read this chaper in the presentation carefully.
Torsten
on 16 Jul 2023
Edited: Torsten
on 16 Jul 2023
The general solution for the intersection of the hyperplanes P1 and P2 is given by the solution of the linear system
Aeq*x = beq
with general solution
S = pinv(Aeq)*beq + null(Aeq)
(S = special solution of the inhomogeneous linear system + vector space of solutions of the homogeneous system)
The general solution for the intersection of the hyperplanes P1 and P3 is given by the solution of the linear system
Aeq22*x = beq22
with general solution
S' = pinv(Aeq22)*beq22 + null(Aeq22)
(S' = special solution of the inhomogeneous linear system + vector space of solutions of the homogeneous system)
M
on 19 Jul 2023
Edited: M
on 19 Jul 2023
Hi @Torsten, I tried to calculate the distance between the affine spaces S= origin+directions but it always gives( 0+number i ) , the real part is always zero.
it seems that we can only calculate the distance between the homogeneous spaces
Torsten
on 20 Jul 2023
Edited: Torsten
on 20 Jul 2023
I tried to calculate the distance between the affine spaces S= origin+directions but it always gives( 0+number i ) , the real part is always zero.
Example ?
Do you have another idea if thers is another solution other than calculating the distance? because in some cases it gives small distance but the two subspaces are not close to parallel!
Example ? And what makes you think the two subspaces are not close to parallel ?
Do you have another idea if thers is another solution other than calculating the distance?
The measure suggested in the link seems to do exactly what you want, doesn't it ?
M
on 20 Jul 2023
Example:
Attached all the directions and all the origin of the problem.
for example I tried to take the distance between D{4,5} and all other cases
the real number all are zeros
load('origin.mat')
load('directions.mat')
%D=cell(6,9);
%D=directions;
D =cellfun(@plus, origin,directions,'uni',0);
%D = D.D;
n = size(D,1);
m = size(D,2);
distance = zeros(n,m,n,m);
for i=1:n
for j=1:m
for i1=1:n
for j1=1:m
[~,S,~] = svd(D{4,5}.'*D{i1,j1});
distance(i,j,i1,j1) = sqrt(sum(arrayfun(@(k)acos(S(k,k))^2,1:size(S,1))));
end
end
end
end
distance
distance =
distance(:,:,1,1) =
0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i
0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i
0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i
0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i
0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i
0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i 0.0000 +25.5394i
distance(:,:,2,1) =
0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i
0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i
0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i
0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i
0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i
0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i 0.0000 +26.0639i
distance(:,:,3,1) =
0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i
0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i
0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i
0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i
0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i
0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i 0.0000 +24.5728i
distance(:,:,4,1) =
0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i
0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i
0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i
0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i
0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i
0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i 0.0000 +26.4065i
distance(:,:,5,1) =
0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i
0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i
0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i
0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i
0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i
0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i 0.0000 +26.0708i
distance(:,:,6,1) =
0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i
0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i
0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i
0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i
0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i
0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i 0.0000 +26.1368i
distance(:,:,1,2) =
0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i
0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i
0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i
0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i
0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i
0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i 0.0000 +25.3815i
distance(:,:,2,2) =
0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i
0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i
0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i
0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i
0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i
0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i 0.0000 +25.3847i
distance(:,:,3,2) =
0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i
0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i
0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i
0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i
0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i
0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i 0.0000 +25.6358i
distance(:,:,4,2) =
0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i
0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i
0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i
0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i
0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i
0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i 0.0000 +27.3618i
distance(:,:,5,2) =
0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i
0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i
0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i
0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i
0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i
0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i 0.0000 +26.8112i
distance(:,:,6,2) =
0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i
0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i
0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i
0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i
0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i
0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i 0.0000 +26.6472i
distance(:,:,1,3) =
0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i
0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i
0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i
0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i
0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i
0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i 0.0000 +26.5228i
distance(:,:,2,3) =
0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i
0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i
0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i
0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i
0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i
0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i 0.0000 +26.0607i
distance(:,:,3,3) =
0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i
0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i
0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i
0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i
0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i
0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i 0.0000 +25.9689i
distance(:,:,4,3) =
0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i
0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i
0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i
0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i
0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i
0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i 0.0000 +25.9603i
distance(:,:,5,3) =
0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i
0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i
0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i
0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i
0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i
0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i 0.0000 +26.2209i
distance(:,:,6,3) =
0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i
0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i
0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i
0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i
0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i
0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i 0.0000 +27.5064i
distance(:,:,1,4) =
0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i
0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i
0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i
0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i
0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i
0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i 0.0000 +27.1657i
distance(:,:,2,4) =
0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i
0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i
0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i
0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i
0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i
0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i 0.0000 +26.5311i
distance(:,:,3,4) =
0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i
0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i
0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i
0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i
0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i
0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i 0.0000 +26.6235i
distance(:,:,4,4) =
0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i
0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i
0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i
0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i
0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i
0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i 0.0000 +28.3050i
distance(:,:,5,4) =
0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i
0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i
0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i
0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i
0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i
0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i 0.0000 +27.9510i
distance(:,:,6,4) =
0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i
0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i
0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i
0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i
0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i
0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i 0.0000 +25.8866i
distance(:,:,1,5) =
0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i
0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i
0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i
0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i
0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i
0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i 0.0000 +26.9685i
distance(:,:,2,5) =
0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i
0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i
0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i
0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i
0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i
0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i 0.0000 +28.1636i
distance(:,:,3,5) =
0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i
0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i
0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i
0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i
0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i
0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i 0.0000 +27.1048i
distance(:,:,4,5) =
0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i
0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i
0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i
0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i
0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i
0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i 0.0000 +28.7778i
distance(:,:,5,5) =
0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i
0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i
0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i
0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i
0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i
0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i 0.0000 +27.5957i
distance(:,:,6,5) =
0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i
0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i
0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i
0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i
0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i
0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i 0.0000 +26.5471i
distance(:,:,1,6) =
0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i
0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i
0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i
0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i
0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i
0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i 0.0000 +28.2230i
distance(:,:,2,6) =
0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i
0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i
0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i
0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i
0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i
0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i 0.0000 +27.1450i
distance(:,:,3,6) =
0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i
0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i
0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i
0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i
0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i
0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i 0.0000 +24.2001i
distance(:,:,4,6) =
0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i
0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i
0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i
0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i
0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i
0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i 0.0000 +27.5819i
distance(:,:,5,6) =
0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i
0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i
0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i
0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i
0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i
0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i 0.0000 +27.7071i
distance(:,:,6,6) =
0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i
0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i
0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i
0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i
0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i
0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i 0.0000 +28.2054i
distance(:,:,1,7) =
0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i
0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i
0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i
0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i
0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i
0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i 0.0000 +28.2321i
distance(:,:,2,7) =
0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i
0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i
0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i
0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i
0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i
0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i 0.0000 +27.5769i
distance(:,:,3,7) =
0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i
0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i
0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i
0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i
0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i
0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i 0.0000 +27.7906i
distance(:,:,4,7) =
0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i
0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i
0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i
0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i
0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i
0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i 0.0000 +29.7679i
distance(:,:,5,7) =
0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i
0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i
0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i
0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i
0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i
0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i 0.0000 +29.5538i
distance(:,:,6,7) =
0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i
0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i
0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i
0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i
0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i
0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i 0.0000 +30.2978i
distance(:,:,1,8) =
0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i
0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i
0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i
0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i
0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i
0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i 0.0000 +28.8034i
distance(:,:,2,8) =
0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i
0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i
0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i
0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i
0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i
0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i 0.0000 +29.6528i
distance(:,:,3,8) =
0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i
0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i
0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i
0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i
0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i
0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i 0.0000 +29.5229i
distance(:,:,4,8) =
0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i
0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i
0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i
0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i
0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i
0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i 0.0000 +29.1059i
distance(:,:,5,8) =
0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i
0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i
0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i
0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i
0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i
0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i 0.0000 +30.0848i
distance(:,:,6,8) =
0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i
0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i
0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i
0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i
0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i
0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i 0.0000 +29.6861i
distance(:,:,1,9) =
0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i
0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i
0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i
0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i
0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i
0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i 0.0000 +30.1252i
distance(:,:,2,9) =
0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i
0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i
0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i
0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i
0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i
0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i 0.0000 +29.5900i
distance(:,:,3,9) =
0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i
0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i
0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i
0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i
0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i
0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i 0.0000 +26.5314i
distance(:,:,4,9) =
0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i
0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i
0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i
0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i
0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i
0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i 0.0000 +28.7677i
distance(:,:,5,9) =
0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i
0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i
0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i
0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i
0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i
0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i 0.0000 +30.8689i
distance(:,:,6,9) =
0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i
0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i
0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i
0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i
0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i
0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i 0.0000 +34.2589i
Torsten
on 20 Jul 2023
Edited: Torsten
on 20 Jul 2023
Where did you read to add the origins to the directions ? This is certainly wrong.
Seems that for affine spaces, the concept from above has to be replaced by the "affine principle angles" from slide 28. Thus in the computation of the SVD, "directions" has to be replace by [directions,origin'/sqrt(1+norm(origin')^2);zeros(1,size(directions,2)),1/sqrt(1+norm(origin')^2)
But you have to find out how to compute "origin' " from "origin". My guess is that origin' is computed from [origin;1] which is then made orthonormal to A. But you should check this.
M
on 20 Jul 2023
Edited: M
on 20 Jul 2023
@Torsten I didnt get how to applay this
Thus in the computation of the SVD, "directions" has to be replace by [directions,origin_A/sqrt(1+norm(origin_A)^2);zeros(1,size(directions,2)),1/sqrt(1+norm(origin_A)^2)
Could you please elaborate it in this code
[U,S,V] = svd(directions1.'*directions2) %slice 14
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:4))) %s slice 12 and slice 14
M
on 20 Jul 2023
Edited: M
on 20 Jul 2023
P1=[396218721.065513 -205153846.153846 0 0 0 0
-205153846.153846 396218721.065513 -205153846.153846 0 0 0
0 -205153846.153846 396218721.065513 -205153846.153846 0 0
0 0 -205153846.153846 396218721.065513 -205153846.153846 0
0 0 0 -205153846.153846 396218721.065513 -205153846.153846
0 0 0 0 -205153846.153846 198109360.532757];
P2=[239737786.836378 -41030769.2307692 0 0 0 0
-41030769.2307692 239737786.836378 -205153846.153846 0 0 0
0 -205153846.153846 403860863.759455 -205153846.153846 0 0
0 0 -205153846.153846 403860863.759455 -205153846.153846 0
0 0 0 -205153846.153846 403860863.759455 -205153846.153846
0 0 0 0 -205153846.153846 201930431.879727];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq2=null([P2(2:6,:)-P2(1,:)])';
beq1=Aeq1*P1(1,:)';
beq2=Aeq2*P2(1,:)';
Aeq=[Aeq1;Aeq2];
beq=[beq1;beq2];
assert( rank([Aeq,beq])==rank(Aeq) , 'Hyperplanes do not intersect')
origin1 = pinv(Aeq)*beq
origin1 = 6×1
1.0e+04 *
-6.8832
8.1890
2.5987
-1.8223
-4.6515
-5.6221
directions1 = null(Aeq)
directions1 = 6×4
-0.1750 -0.3776 -0.5066 -0.5507
-0.5308 -0.2946 -0.1425 -0.0902
0.8120 -0.1800 -0.1745 -0.1725
-0.1258 0.8234 -0.2087 -0.2196
-0.0857 -0.1739 0.7699 -0.2493
-0.0718 -0.1730 -0.2374 0.7406
P3=[376176938.886082 -184638461.538462 0 0 0 0
-184638461.538462 376176938.886082 -205153846.153846 0 0 0
0 -205153846.153846 396692323.501467 -205153846.153846 0 0
0 0 -205153846.153846 396692323.501467 -205153846.153846 0
0 0 0 -205153846.153846 396692323.501467 -205153846.153846
0 0 0 0 -205153846.153846 198346161.750733];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq3=null([P3(2:6,:)-P3(1,:)])';
beq1=Aeq1*P1(1,:)';
beq3=Aeq3*P3(1,:)';
Aeq22=[Aeq1;Aeq3];
beq22=[beq1;beq3];
assert( rank([Aeq22,beq22])==rank(Aeq) , 'Hyperplanes do not intersect')
origin2 = pinv(Aeq22)*beq22
origin2 = 6×1
1.0e+06 *
-0.9104
1.3951
0.6253
-0.0096
-0.4236
-0.5618
directions2 = null(Aeq22)
directions2 = 6×4
-0.1807 -0.3839 -0.5148 -0.5587
-0.5343 -0.2872 -0.1249 -0.0708
0.8089 -0.1800 -0.1720 -0.1694
-0.1260 0.8228 -0.2098 -0.2208
-0.0831 -0.1746 0.7665 -0.2533
-0.0688 -0.1739 -0.2416 0.7357
D1 = [directions1,origin1/sqrt(1+norm(origin1)^2);zeros(1,size(directions1,2)),1/sqrt(1+norm(origin1)^2)];
D2 = [ directions2,origin2/sqrt(1+norm(origin2)^2);zeros(1,size(directions2,2)),1/sqrt(1+norm(origin2)^2)];
[U,S,V] = svd (D1'*D2);
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:4)))
distance = 1.4901e-08
M
on 20 Jul 2023
Edited: M
on 20 Jul 2023
Also, Where did you read to add the origins to the directions ? This is certainly wrong.
I did this based on this answer, it seems I got it in a wrong way
Yes. A1 = origin1 + span(directions1) and A2 = origin2 + span(directions2) are the two affine subspaces you have to compare.
(S = special solution of the inhomogeneous linear system + vector space of solutions of the homogeneous system)
Also, I didnt get this:
But you have to find out how to compute "origin' " from "origin". My guess is that origin' is computed from [origin;1] which is then made orthonormal to A. But you should check this.
Could you please clarify?
Torsten
on 20 Jul 2023
I think this is what the slides want to tell us about the distance of affine subspaces. I'm not certain, but if you want to test for parallelity and not for similarity of the affine subspaces, you won't have to consider the origin, have you ? So in my opinion, the first measure (only considering the vector spaces excluding the origin) was the correct one for your purpose.
P1=[396218721.065513 -205153846.153846 0 0 0 0
-205153846.153846 396218721.065513 -205153846.153846 0 0 0
0 -205153846.153846 396218721.065513 -205153846.153846 0 0
0 0 -205153846.153846 396218721.065513 -205153846.153846 0
0 0 0 -205153846.153846 396218721.065513 -205153846.153846
0 0 0 0 -205153846.153846 198109360.532757];
P2=[239737786.836378 -41030769.2307692 0 0 0 0
-41030769.2307692 239737786.836378 -205153846.153846 0 0 0
0 -205153846.153846 403860863.759455 -205153846.153846 0 0
0 0 -205153846.153846 403860863.759455 -205153846.153846 0
0 0 0 -205153846.153846 403860863.759455 -205153846.153846
0 0 0 0 -205153846.153846 201930431.879727];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq2=null([P2(2:6,:)-P2(1,:)])';
beq1=Aeq1*P1(1,:)';
beq2=Aeq2*P2(1,:)';
Aeq=[Aeq1;Aeq2];
beq=[beq1;beq2];
assert( rank([Aeq,beq])==rank(Aeq) , 'Hyperplanes do not intersect')
origin1 = pinv(Aeq)*beq
origin1 = 6×1
1.0e+04 *
-6.8832
8.1890
2.5987
-1.8223
-4.6515
-5.6221
directions1 = null(Aeq)
directions1 = 6×4
-0.1750 -0.3776 -0.5066 -0.5507
-0.5308 -0.2946 -0.1425 -0.0902
0.8120 -0.1800 -0.1745 -0.1725
-0.1258 0.8234 -0.2087 -0.2196
-0.0857 -0.1739 0.7699 -0.2493
-0.0718 -0.1730 -0.2374 0.7406
P3=[376176938.886082 -184638461.538462 0 0 0 0
-184638461.538462 376176938.886082 -205153846.153846 0 0 0
0 -205153846.153846 396692323.501467 -205153846.153846 0 0
0 0 -205153846.153846 396692323.501467 -205153846.153846 0
0 0 0 -205153846.153846 396692323.501467 -205153846.153846
0 0 0 0 -205153846.153846 198346161.750733];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq3=null([P3(2:6,:)-P3(1,:)])';
beq1=Aeq1*P1(1,:)';
beq3=Aeq3*P3(1,:)';
Aeq22=[Aeq1;Aeq3];
beq22=[beq1;beq3];
assert( rank([Aeq22,beq22])==rank(Aeq) , 'Hyperplanes do not intersect')
origin2 = pinv(Aeq22)*beq22
origin2 = 6×1
1.0e+06 *
-0.9104
1.3951
0.6253
-0.0096
-0.4236
-0.5618
directions2 = null(Aeq22)
directions2 = 6×4
-0.1807 -0.3839 -0.5148 -0.5587
-0.5343 -0.2872 -0.1249 -0.0708
0.8089 -0.1800 -0.1720 -0.1694
-0.1260 0.8228 -0.2098 -0.2208
-0.0831 -0.1746 0.7665 -0.2533
-0.0688 -0.1739 -0.2416 0.7357
directions1 = [directions1;zeros(1,size(directions1,2))];
origin1 = [origin1;1];
origin1_tilde = origin1;
for i = 1:size(directions1,2)
origin1_tilde = origin1_tilde - dot(directions1(:,i),origin1)*directions1(:,i);
end
origin1_tilde = origin1_tilde/norm(origin1_tilde);
directions1 = [directions1,origin1_tilde];
directions2 = [directions2;zeros(1,size(directions2,2))];
origin2 = [origin2;1];
origin2_tilde = origin2;
for i = 1:size(directions2,2)
origin2_tilde = origin2_tilde - dot(directions2(:,i),origin2)*directions2(:,i);
end
origin2_tilde = origin2_tilde/norm(origin2_tilde);
directions2 = [directions2,origin2_tilde];
[~,S,~] = svd (directions1.'*directions2);
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:size(S,1))))
distance = 0.2862
M
on 21 Jul 2023
Hi @Torsten, thanks but could you please clarify what did you mean in similarity of the affine subspaces?
Also, I didnt really get your last code. Based on what did you write it?
could you please clarify to me the following part of your code?Why did you compute it as this? please put comments on each line.
What does origin1 = [origin1;1]; mean?
directions1 = [directions1;zeros(1,size(directions1,2))];
origin1 = [origin1;1];
origin1_tilde = origin1;
for i = 1:size(directions1,2)
origin1_tilde = origin1_tilde - dot(directions1(:,i),origin1)*directions1(:,i);
end
origin1_tilde = origin1_tilde/norm(origin1_tilde);
directions1 = [directions1,origin1_tilde];
Torsten
on 22 Jul 2023
Edited: Torsten
on 22 Jul 2023
thanks but could you please clarify what did you mean in similarity of the affine subspaces?
Imagine 2 planes in 3d-space. As far as I understood what you asked is to decide whether the planes are parallel and the distance between them does not matter. What I mean by similar is that the planes are parallel and their distance is almost 0.
could you please clarify to me the following part of your code?Why did you compute it as this?
I computed the matrix [A,b0/sqrt(1+||b0||^2);0,1/sqrt(1+||b0||^2)] at the bottom of slide 28. All that is necessary is to apply Gram-Schmidt to make [origin1,1] orthonormal to directions1.' in order to get b0 from b.
All this is linear algebra first semester. If you have difficulties with these concepts, you should read an introductionary book on the subject first.
M
on 22 Jul 2023
Thank you @Torsten,could you please give me a reference that mentioned the concept of similarity? I didn't find it in the slides.
Also could you please tell me where in the slides they added one in the end of the origin vector [origin1,1].
I am from engineering background, I didnt take this course before that's why I have some difficulties.
Thanks
Torsten
on 22 Jul 2023
Edited: Torsten
on 22 Jul 2023
could you please give me a reference that mentioned the concept of similarity? I didn't find it in the slides.
The subject of the slides (beginning at slide 25) is "distance of affine subspaces". In my opinion, this refers to what I called "similarity" (i.e. distance matters). That's why I wrote that it doesn't seem to be relevant for your case because you talked about a measure for "parallelity of affine subspaces". This concept is the subspace concept beginning with slide 3 (i.e. only taking the vectorspace into account).
Also could you please tell me where in the slides they added one in the end of the origin vector [origin1,1].
Slide 27. If the vectors in [directions1,origin1] are n-dimensional, they are embedded in (n+1)-dimensional space by [directions1,origin1;zeros(size(directions1,2),1),1].
To check whether the formulae make sense, I would take a plane in three-dimensional space written in two different ways
(x,y,z).' = origin1+directions1*(lambda,mu,zeta)
(x,y,z)' = origin2+directions2*(lambda,mu,zeta)
with directions1, directions2 being orthonormal and check whether their distance is 0 if you compute it following the code
directions1 = [directions1;zeros(1,size(directions1,2))];
origin1 = [origin1;1];
origin1_tilde = origin1;
for i = 1:size(directions1,2)
origin1_tilde = origin1_tilde - dot(directions1(:,i),origin1)*directions1(:,i);
end
origin1_tilde = origin1_tilde/norm(origin1_tilde);
directions1 = [directions1,origin1_tilde];
directions2 = [directions2;zeros(1,size(directions2,2))];
origin2 = [origin2;1];
origin2_tilde = origin2;
for i = 1:size(directions2,2)
origin2_tilde = origin2_tilde - dot(directions2(:,i),origin2)*directions2(:,i);
end
origin2_tilde = origin2_tilde/norm(origin2_tilde);
directions2 = [directions2,origin2_tilde];
[~,S,~] = svd (directions1.'*directions2);
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:size(S,1))))
Torsten
on 22 Jul 2023
Edited: Torsten
on 22 Jul 2023
Could you please clarify how did you get this equation?
dimensional space by [directions1,origin1;zeros(size(directions1,2),1),1].
Slide 27. Instead of origin1, dimensions1 as affine subspace of IR^n, one works with the subspace in IR^(n+1) spanned by [dimension1;0] and [origin;0] + e_(n+1) where e_(n+1) is the (n+1)-th unit vector.
Example:
If origin1 = [5; 6] and directions1 = 1/sqrt(2) * [1; 1] spans an affine subspace of IR^2, one works with j(origin1+directions1) = span(1/sqrt(2) *[1; 1; 0], [[5 ;6 ;0]+[0 ;0 ;1]]) as a linear subspace of IR^3.
M
on 22 Jul 2023
Edited: M
on 22 Jul 2023
@Torsten as I understand so far this is the fourth case in slide 27 "X c ∼= Gr(k + 1, n)"
this is increased the dimension of the problem so we can get a useful distance as mentioned in the slide 27 "first three do not give useful distance on Graff(k, n) [Ye–LHL, 2014] but last one does"
Am I right?
M
on 22 Jul 2023
Edited: M
on 22 Jul 2023
@Torsten I got confused!
Do you mean these two matrices?
D1 = [directions1,origin1/sqrt(1+norm(origin1)^2);zeros(1,size(directions1,2)),1/sqrt(1+norm(origin1)^2)];
D2 = [ directions2,origin2/sqrt(1+norm(origin2)^2);zeros(1,size(directions2,2)),1/sqrt(1+norm(origin2)^2)];
[U,S,V] = svd (D1.'*D2);
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:size(S,1))))
Which formula is the correct one to compute the distance? the singular value decomposition Or this:
directions1 = [directions1;zeros(1,size(directions1,2))];
origin1 = [origin1;1];
origin1_tilde = origin1;
for i = 1:size(directions1,2)
origin1_tilde = origin1_tilde - dot(directions1(:,i),origin1)*directions1(:,i);
end
origin1_tilde = origin1_tilde/norm(origin1_tilde);
directions1 = [directions1,origin1_tilde];
directions2 = [directions2;zeros(1,size(directions2,2))];
origin2 = [origin2;1];
origin2_tilde = origin2;
for i = 1:size(directions2,2)
origin2_tilde = origin2_tilde - dot(directions2(:,i),origin2)*directions2(:,i);
end
origin2_tilde = origin2_tilde/norm(origin2_tilde);
directions2 = [directions2,origin2_tilde];
[~,S,~] = svd (directions1.'*directions2);
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:size(S,1))))
Torsten
on 22 Jul 2023
Edited: Torsten
on 22 Jul 2023
directions1 = [directions1;zeros(1,size(directions1,2))];
origin1 = [origin1;1];
origin1_tilde = origin1;
for i = 1:size(directions1,2)
origin1_tilde = origin1_tilde - dot(directions1(:,i),origin1)*directions1(:,i);
end
origin1_tilde = origin1_tilde/norm(origin1_tilde);
% The following "directions1" is the matrix
% [[A, b0/sqrt(1+norm(b0)^2)];[0,1/sqrt(1+norm(b0)^2)]
% at the bottom of slide 28
directions1 = [directions1,origin1_tilde];
directions2 = [directions2;zeros(1,size(directions2,2))];
origin2 = [origin2;1];
origin2_tilde = origin2;
for i = 1:size(directions2,2)
origin2_tilde = origin2_tilde - dot(directions2(:,i),origin2)*directions2(:,i);
end
origin2_tilde = origin2_tilde/norm(origin2_tilde);
% The following "directions2" is the matrix
% [[B, c0/sqrt(1+norm(c0)^2)];[0,1/sqrt(1+norm(c0)^2)]
% at the bottom of slide 28
directions2 = [directions2,origin2_tilde];
% The following svd computes the distance between the affine spaces,
% represented by "directions1" and "directions2"
[~,S,~] = svd (directions1.'*directions2);
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:size(S,1))))
After all the effort, maybe you can finally tell us what the underlying problem of your calculations is ?
Bruno Luong
on 23 Jul 2023
Edited: Bruno Luong
on 23 Jul 2023
What bother me in the definition of distance from this pdf presentation paper, the distance is not invariant by translation. The world origin matter as showed in this simple example where I shift the global origin father and father, the distance get smaller instead of remains constant. May be that is desired property for the author of this paper, , some sort of distance observed by someone who seats at the world origin (of coordinates) but I'm not sure it is desired here by @M.
directions1 = [1;0];
origin1 = [0;0];
directions2 = [1;0];
origin2 = [0;1];
shifty = 2.^[0:20];
for i=1:length(shifty)
org = [0; shifty(i)];
d(i) = afinedist(directions1, origin1-org, directions2, origin2-org);
end
d
d = 1×21
0.7854 0.3218 0.0768 0.0175 0.0041 0.0010 0.0002 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0 0 0 0 0 0 0
semilogx(shifty, d)
function distance = afinedist(directions1, origin1, directions2, origin2)
directions1 = [directions1;zeros(1,size(directions1,2))];
origin1 = [origin1;1];
origin1_tilde = origin1;
for i = 1:size(directions1,2)
origin1_tilde = origin1_tilde - dot(directions1(:,i),origin1)*directions1(:,i);
end
origin1_tilde = origin1_tilde/norm(origin1_tilde);
% The following "directions1" is the matrix
% [[A, b0/sqrt(1+norm(b0)^2)];[0,1/sqrt(1+norm(b0)^2)]
% at the bottom of slide 28
directions1 = [directions1,origin1_tilde];
directions2 = [directions2;zeros(1,size(directions2,2))];
origin2 = [origin2;1];
origin2_tilde = origin2;
for i = 1:size(directions2,2)
origin2_tilde = origin2_tilde - dot(directions2(:,i),origin2)*directions2(:,i);
end
origin2_tilde = origin2_tilde/norm(origin2_tilde);
% The following "directions2" is the matrix
% [[B, c0/sqrt(1+norm(c0)^2)];[0,1/sqrt(1+norm(c0)^2)]
% at the bottom of slide 28
directions2 = [directions2,origin2_tilde];
% The following svd computes the distance between the affine spaces,
% represented by "directions1" and "directions2"
[~,S,~] = svd (directions1.'*directions2);
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:min(size(S)))));
end
Torsten
on 23 Jul 2023
Edited: Torsten
on 23 Jul 2023
What bother me in the definition of distance from this pdf presentation paper, the distance is not invariant by translation.
Yes, that's counter-intuitive - seems to be some distance in the projective space. But as already mentionned, if @M wants to study the degree of parallelity of the affine spaces, I think considering only the underlying vector spaces that are added to the origins will suffice. For their distance, you gave "subspace" as equivalent MATLAB command to the svd solution in the presentation.
Maybe the method to determine the distance between two affine subspaces in IR^n discussed on slide 108 of
Bruno Luong
on 23 Jul 2023
Edited: Bruno Luong
on 23 Jul 2023
This formula page 107-108 returns the distance projected on orthogonal to both afine space, but did not care how the afine space are oriented, which as I understand is the main preoccupation of @M.
The formula with SVD is fine, if one wants to remove the artefact of origin dependent, one can modify the formla of svd applied on the upper-left block and ignore the projectve part.
I believe this modification is different than MATLAB subspace. It seems MATLAB subspace considers only the largest singular value and not the whole spectrum. (But this is just an intuition, don't quote me on it)
M
on 23 Jul 2023
Edited: M
on 23 Jul 2023
@Torsten @Bruno Luong I want to measure the degree of parallelism to get how close the affine subspaces are (the directions+origins Or only directions). because this closeness is an indicator in my problem. (In my problem every group of subspaces are in the same orientation, close to parallel so the distance between them should be too small, if a subspace close to this group then this subspace is belong to this group)
I tested the both methods that @Torsten suggested, the second method gave better results than the first one, but still it fails in some cases.
Torsten
on 23 Jul 2023
I believe this modification is different than MATLAB subspace. It seems MATLAB subspace considers only the largest singular value and not the whole spectrum.
You mean
P1=[396218721.065513 -205153846.153846 0 0 0 0
-205153846.153846 396218721.065513 -205153846.153846 0 0 0
0 -205153846.153846 396218721.065513 -205153846.153846 0 0
0 0 -205153846.153846 396218721.065513 -205153846.153846 0
0 0 0 -205153846.153846 396218721.065513 -205153846.153846
0 0 0 0 -205153846.153846 198109360.532757];
P2=[239737786.836378 -41030769.2307692 0 0 0 0
-41030769.2307692 239737786.836378 -205153846.153846 0 0 0
0 -205153846.153846 403860863.759455 -205153846.153846 0 0
0 0 -205153846.153846 403860863.759455 -205153846.153846 0
0 0 0 -205153846.153846 403860863.759455 -205153846.153846
0 0 0 0 -205153846.153846 201930431.879727];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq2=null([P2(2:6,:)-P2(1,:)])';
beq1=Aeq1*P1(1,:)';
beq2=Aeq2*P2(1,:)';
Aeq=[Aeq1;Aeq2];
beq=[beq1;beq2];
assert( rank([Aeq,beq])==rank(Aeq) , 'Hyperplanes do not intersect');
origin1 = pinv(Aeq)*beq;
directions1 = null(Aeq);
P3=[376176938.886082 -184638461.538462 0 0 0 0
-184638461.538462 376176938.886082 -205153846.153846 0 0 0
0 -205153846.153846 396692323.501467 -205153846.153846 0 0
0 0 -205153846.153846 396692323.501467 -205153846.153846 0
0 0 0 -205153846.153846 396692323.501467 -205153846.153846
0 0 0 0 -205153846.153846 198346161.750733];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq3=null([P3(2:6,:)-P3(1,:)])';
beq1=Aeq1*P1(1,:)';
beq3=Aeq3*P3(1,:)';
Aeq22=[Aeq1;Aeq3];
beq22=[beq1;beq3];
assert( rank([Aeq22,beq22])==rank(Aeq) , 'Hyperplanes do not intersect');
origin2 = pinv(Aeq22)*beq22;
directions2 = null(Aeq22);
format long
[~,S,~] = svd(directions1.'*directions2);
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:size(S,1))))
distance =
0.030326156636535
subspace(directions1,directions2)
ans =
0.030326156636556
?
Torsten
on 23 Jul 2023
Edited: Torsten
on 23 Jul 2023
I want to measure the degree of parallelism to get how close the affine subspaces are (the directions+origins Or only directions).
You still didn't answer the main question:
Consider the two lines:
[x;y] = [0;0] + lambda*[0;1]
[x;y] = [5000;0] + lambda*[0;1] , lambda in IR
They are parallel, but not close. So what is your concern ? Should the calculation give a small or a high value for these two affine spaces ?
M
on 23 Jul 2023
Edited: M
on 23 Jul 2023
@Torsten They are parallel, but not close. So what is your concern ? Should the calculation give a small or a high value for these two affine spaces ?
In my case they should be close to parallel and and the distance between them small.
The calculation should give a small values these two affine spaces
Torsten
on 23 Jul 2023
Edited: Torsten
on 23 Jul 2023
The calculation should give a small values these two affine spaces
But the Euclidean distance between them is 5000 ... This doesn't matter ? Only being parallel counts ?
but still it fails in some cases. Maybe I have to try the third method that you have suggested
@Bruno Luong is correct: this method is not suited in your case because it doesn't care about the similarity in orientation of the subspaces. E.g. you can get a distance of 0 although the suspaces are perpendicular.
M
on 23 Jul 2023
Edited: M
on 23 Jul 2023
Only being parallel counts ?
being parallel and close are considering
The second method that you have suggested (considering the directions and origins) gave small values to the subspaces that belong to each other that I know from the concepet of the problem that these subspaces should be close to parallel .
but still it fails in some cases. Maybe I have to try the third method that you have suggested. in slide 108
Torsten
on 23 Jul 2023
I meant to say that the third method described on slide 108 of
is not suited for your purpose. I think you didn't test it yet, did you ?
I could imagine that one way to compare two affine subspaces could be to compare only directions as a first measure and the distance of the two points in the affine subspaces with minimum distance to the origin as a second measure. But I don't know how to combine these two measures because they happen on different scales (svd distance versus Euclidean distance).
M
on 23 Jul 2023
Edited: M
on 23 Jul 2023
is not suited for your purpose. I think you didn't test it yet, did you ?
still not, I got you wrong in the previous comment.
I could imagine that one way to compare two affine subspaces could be to compare only directions as a first measure
this is reasonable, I thought of this before and I found that we can measure the similarity by different approaches, then measure the distance. I may try one of the similarity approaches.
But still I have a concern what is the exact meaning of the distance that the 2nd method states, because it somehow test the parrallity and distance which I targeted both.
Torsten
on 24 Jul 2023
Edited: Torsten
on 24 Jul 2023
Table 1 on page 19 of
gives a list of possible distances between affine subspaces. I cannot tell you in how far these metrics reflect both criteria ( orientation and distance ) and in how far they are useful for your purpose.
They are simply metrics on the set of affine subspaces of the same dimension with the three defining properties of a metric:
(1) d(x,y) >= 0 and d(x,y) = 0 <=> x = y
(2) d(x,y) = d(y,x)
(3) d(x,z) <= d(x,y) + d(y,z)
for x,y,z being affine subspaces of the same dimension.
Bruno Luong
on 24 Jul 2023
Edited: Bruno Luong
on 24 Jul 2023
...
format long
[~,S,~] = svd(directions1.'*directions2);
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:size(S,1))))
distance =
0.030326156636535
subspace(directions1,directions2)
ans =
0.030326156636556
Yes, this makes clear the "parallel" between modify Grassmann's distance for only direction comparison (svd) and MATLAB subspace command. thanks.
M
on 24 Jul 2023
Edited: M
on 24 Jul 2023
Hi @Torsten, When I tested the eqaution at the bottom of slide 28 it didnt give same result of directions1
% The following "directions1" is the matrix
% [[A, b0/sqrt(1+norm(b0)^2)];[0,1/sqrt(1+norm(b0)^2)]
% at the bottom of slide 28
directions1 = [directions1,origin1_tilde];
Also, the last column in directions1 is always [0 0 0 0 0 0 1] , How this can be an indication of the origin?
The construction of the matrix is always [direction, zeros; zeros 1]
Torsten
on 24 Jul 2023
When I tested the eqaution at the bottom of slide 28 it didnt give same result of directions1
I don't understand what you mean.
Also, the last column in directions1 is always [0 0 0 0 0 0 1] , How this can be an indication of the origin?
In case origin1_tilde(1:end-1) is the zero vector, your affine subspace contains the origin (i.e. origin1 is contained in span(directions1)). This means that the affine space equals the vector space.
Bruno Luong
on 31 Jul 2023
Edited: Bruno Luong
on 31 Jul 2023
Before I move on for the record, I post here a function that compute Grassmann distance
function distance = GrassmannDist(A1, b1, A2, b2)
% Compute Grassmann distance of two afine spaces embeded in R^m of the same dimension of
% the form V = { A*x + b : x in R^n }
% where A is (m x n) matrix and b is (m x 1) vector.
% Usualy n <= dimesnion(V) = rank(A) < m.
pMat1 = GetpMat(A1, b1);
pMat2 = GetpMat(A2, b2);
s = svd(pMat1'*pMat2);
distance = norm(acos(min(s,1)));
end
function pMat = GetpMat(A, b)
A = orth(A);
b = b(:);
b0 = [b-A*(A'*b); 1];
b0 = b0/norm(b0);
A(end+1,end) = 0;
pMat = [A,b0];
end
PS: I hope @M could give a feedback or a thanks to Torsen for the lengthly thread, but no he just quits quitely
Torsten
on 31 Jul 2023
PS: I hope @M could give a feedback or a thanks to Torsen for the lengthly thread, but no he just quits quitely
He/she still has to digest https://arxiv.org/pdf/1807.10883.pdf
:-)
M
on 13 Aug 2023
Edited: M
on 13 Aug 2023
I was studying the problem from all aspects, but unfortunately I didn't find a robust solution till now, but your solution worked in some cases but in others it failed!
I think I need to find another indicator other than distance
Torsten
on 13 Aug 2023
unfortunately I didn't find a robust solution till now, but your solution worked in some cases but in others it failed!
Well, that's life. But it's not my solution, but apparently the usual way on how to define the distance between affine subspaces of the same dimension.
M
on 13 Aug 2023
@Torsten Yes it's helpful in finding the distances, but it dont give an indicator about the direction or orientation.
Also, maybe the cause of the failed cases came from that the origin in all my cases is zeros, so this makes the problem more difficult!
Torsten
on 13 Aug 2023
Yes it's helpful in finding the distances, but it dont give an indicator about the direction or orientation.
I think it's just the other way round as Bruno's example showed.
Also, maybe the cause of the failed cases came from that the origin in all my cases is zeros, so this makes the problem more difficult!
If the origin is zero in all your cases, why do you treat the concept of affine subspaces at all ? You have to compare two vector subspaces, and for vector subspaces the concept is pretty simple and has been elaborated at the beginning of our discussion.
M
on 13 Aug 2023
Edited: M
on 13 Aug 2023
If the origin is zero in all your cases
Yes, my current cases all have zeros origin.
Why do you treat the concept of affine subspaces at all
But it still somehow useful, and give meaningful solution in some cases.
You have to compare two vector subspaces
Do you mean the following by this:
origin1 + directions1*lambda = origin2 + directions2*mu
has a solution for (lambda,mu), the two intersections cannot be parallel.
If so, this only gives an information about if they are tottaly parallel or not, right?
But in my cases I am sure they are not totally parallel, and I still want to know how close they are and are they in the same direction or not!
Or you meant this
[U,S,V] = svd(directions1.'*directions2) %slice 14
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:4))) %s slice 12 and slice 14
Torsten
on 14 Aug 2023
Or you meant this
[U,S,V] = svd(directions1.'*directions2) %slice 14
distance = sqrt(sum(arrayfun(@(i)acos(S(i,i))^2,1:4))) %s slice 12 and slice 14
Of course.
And I vaguely remember that it was mentionned in the slices that affine and subspace approach both give the same distance if the spaces to compare contain the origin.
M
on 14 Aug 2023
@Torsten Yes that's correct both of these methods give the same answers when they have a common origin(same in my case zeros). But still, these methods give only the distance and don't give a useful meaning about the direction or orientation!
Bruno Luong
on 14 Aug 2023
Edited: Bruno Luong
on 14 Aug 2023
If the returned angle is 0 subspaces are exactly parallel, if the angle is small they are mostly parallel, if the angle is close to pi/2 (90 degree), subspace are mostly orthogonal.
It's not meaningful for you????
M
on 14 Aug 2023
@Bruno the following [U,S,V] = svd(directions1.'*directions2) %slice 14 distance = sqrt(sum(arrayfun(@(i)acos(S(i, i))^2,1:4)))
Gives information about the distance between two objects, how did you convert in terms of angels?
I think I need another indicator besides the distance to make the solution meaningful!
Bruno Luong
on 14 Aug 2023
Edited: Bruno Luong
on 14 Aug 2023
The "distance" in math have abstract meaning, it measures something that satisfied triangular inequality.
In the code
s = svd(pMat1'*pMat2);
distance = norm(acos(min(s,1)));
the Grassmann distance in this code returns result with angle unit, see the acos.
It has been showed manymany time by Torsen and me (see my answer) Grassmann distance and MATLAB subspace command give the SAME value
- when 2 affine spaces pass through the origin, or
- when we ignore the origin in the calculation of Grassmann formula.
This value can be interpreted as the angle between 2 subspaces so it is diretly provide the degree of parallelism between two subspaces, as you asks.
With 50+ posts I wonder why this is still not clear for you.
M
on 14 Aug 2023
Edited: M
on 14 Aug 2023
@Bruno, that's clear to me. But I am sure that only one information is not enough in my problem to determine both the closeness and the orientation! That is why the distance failed in some cases. And I am still searching for another indicator besides the distance.
Bruno Luong
on 14 Aug 2023
Edited: Bruno Luong
on 14 Aug 2023
You never explain why it doesn' work for you. You say both affine space pass through the origin then only the angle meaures how parallel they are, there is no other indicator.
If they are not goes through origin as you claim (sometime yes, somtime no, I can't keep up with your assumptions) then Grassmann distance combines the angles between 2 afine spaces AND their respective distances (true distance now) viewed from the origin.
If you prefer to separate in the affine S := { A*x+b } the orientation of span(A) and offset b, you can consider the projection of the origin to S, denoted by bp:
Q = orth(A)
bp = b-Q*(Q'*b)
Compare the orientations of two given afine spaces S1 a,d S2 using command
subspace(A1,A2) % angle in radian
and compare the offset by
norm(bp1-bp2) % distance as "viewed at the origin"
Here you have two indicators and not combined into one as Grassmann distance.
Now if that doesn't meet your need you have to explain why.
M
on 14 Aug 2023
Edited: M
on 14 Aug 2023
@Bruno Luong thank you so much, but in my problem the origins are all zeros, this is will not be usefull!
You never explain why it doesn' work for you
In some cases it should return the smallest distance but it failed, in others it should return the nearest two or three object but it didn't.
There are engineering proofs that it should be nearest object.
That's why I am searching about other indicator besides the distance, it will restrict the problem. Also, as I said I think because the origins are all zeros this make the problem more vague!
Bruno Luong
on 14 Aug 2023
@M "In some cases it should return the smallest distance but it failed, in others it should return the nearest two or three object but it didn't."
Then simply use whatever the definition of distance and "nearest" used by this engineering proof.
Your origin question asks about "degree of parallelism" (which we already gives you the command subspace that answers exactly this question, no more no less).
I wonder now: what for YOU the relationship between parallelism and notions of distance/nearest?
And just for curiousity what this engineeing proof actually claims? This is something that you never bother to tell us (and you should) beside simply reportng "it doesn't work".
Funny, why you inquires us for a metric without the context and then wonder why it doesn't work? The engineening proof proves with the distance they are using, not with Grassmann distance, which is essentially an angle of the projective geometric consider in space of dimension 1-larger than the initial dimension.
M
on 14 Aug 2023
Edited: M
on 14 Aug 2023
what for YOU the relationship between parallelism and notions of distance/nearest?
yes my original question was about the degree of parallelism but with orientation/direction indicator which I discussed with Torsten in the beginning.
@Torsten suggested the distance idea which was a good addition besides the orientation but still I need another indicator this is all the problem!
Maybe if my origins are not zeros the distance will be more helpful
@Torsten @Bruno Luong Thank you both for this thread, which is very helpful and I learned a lot from it and the from the links that Torsten provided!
Hopefully I can find another good indicator or change something regarding the origins! :)
M
on 14 Aug 2023
Edited: M
on 14 Aug 2023
@Torsten @Bruno Luong I have a question please, Do you know if there is a unique term/indicator that represents the object in affine space in general? I searched about this topic but couldnt find
M
on 15 Aug 2023
@Torsten I mean the object or the space that is generated from the intersection(direction and origin) (we can't say plane right?)
I am asking if there is a unique term that can describe it in general. Or if you know a link that discussed this topic..
It's actually a problem in electrical engineering, I can't tell what is exactly it is, sorry :(
Walter Roberson
on 15 Aug 2023
These kinds of calculation seldom have unique solutions.
Bruno Luong
on 15 Aug 2023
Edited: Bruno Luong
on 15 Aug 2023
The common study objects is "polytope". It can be embeded in afine space. There is nothing particular-interesting aspect about the embedding, simply to reduce the dimension.
Those objects are mathematically VERY different from the afine space.
This thread should be closed and we should move on, the orginal question of quantifying the parallelism of affine spaces has been answered very long ago.
The current discussion here sounds really like OT.
M
on 15 Aug 2023
Edited: M
on 15 Aug 2023
@Bruno Luong I appreciate the recommended solution, and I left the post since 2 weeks, but you yourself asked me to give feedback! I clarified why it didn't answer my question(parallelism in terms of orientation ) so we backed to the discussion, interesting :)
Regarding my last question, it's not a matter of objects or not, I just asked if there are links or useful references to other indicators that represent the affine space(direction, origin) in one unique number. That's all!
Bruno Luong
on 15 Aug 2023
Edited: Bruno Luong
on 15 Aug 2023
It is not (interesting) to me. You still haven't give us a clue why it doesn't meet your need. All this blah blah about "distance" "nearest" "engineering proof" is just fuzzy verbal description like mud. There is no equation, not data, no code, no description about how you apply various solution proposed here, etc...
You might really want to measure a true distance between objects that reside on the affice space (my speculation), but never clearly state that to us.This is not a sincere discussion.
If you want to not disclose the details. Just do not ask question and hide weeks and work on your own. Do not expect any useful help here.
Torsten
on 15 Aug 2023
I mean the object or the space that is generated from the intersection(direction and origin) (we can't say plane right?)
The intersection of two vector spaces is a vector space; the intersection of two affine spaces is an affine space - so you have the same objects before and after your operations.
Bruno Luong
on 18 Aug 2023
Edited: Bruno Luong
on 18 Aug 2023
The grassmann distance proposed in this answer and subspace command measure the angle between affine and subspace so they answer exactly the questin you asked.
The argument about distance and nearest is OT.
M
on 18 Aug 2023
Edited: M
on 18 Aug 2023
@Bruno I think it's not good that you said this is a "dishonest discussion" in a scientific community, also you decided to accept the ans, although I said that it is a good suggestion but it didn't meet my requirement! And I have already thanked Torsten for his explanations and help!
This is not my first question here, when the solution works I myself accept the answer.
Torsten
on 18 Aug 2023
@M Imagine you ask someone for advice what you should eat and he advices you to take a cake. Then you tell the person that the cake doesn't meet your requirements, but you don't tell him that you suffer from diabetes. Do you think it makes sense continuing the discussion with this person ?
Bruno Luong
on 18 Aug 2023
Edited: Bruno Luong
on 18 Aug 2023
This requirement is honestly is NOT in your original question which is for the record about mesuring degree of parallelism of two affine spaces (see your code).
Sahaj
on 16 Jul 2023
Hi M.
You can use the following code to give the percentage of parallelism while including tolerance in determining if the lines can be considered parallel.
% Define the tolerance threshold
tolerance = 0.99; % Adjust this value according to your desired tolerance
% Determine the direction vectors
directions1 = null(Aeq);
directions2 = null(Aeq22);
% Compute the angle between the direction vectors
cosine_angle = dot(directions1(:, 1), directions2(:, 1)) / (norm(directions1(:, 1)) * norm(directions2(:, 1)));
angle_rad = acos(cosine_angle);
% Calculate the percentage of parallelism
angle_deg = rad2deg(angle_rad);
perpendicular_angle_deg = 90 - angle_deg;
percentage_parallelism = (1 - perpendicular_angle_deg / 90) * 100;
% Check if the lines are parallel based on the tolerance threshold
if cosine_angle >= tolerance
fprintf('Lines are parallel with a percentage of parallelism: %.2f%%\n', percentage_parallelism);
else
fprintf('Lines are not parallel.\n');
end
You can repeat the above steps to check the parallelism between plane1 and plane3.
Bruno Luong
on 20 Jul 2023
1 Comment
Bruno Luong
on 22 Jul 2023
Edited: Bruno Luong
on 22 Jul 2023
Tha angle between 2 afine spaces is 0.0303 rad or 1.7376 degrees
P1=[396218721.065513 -205153846.153846 0 0 0 0
-205153846.153846 396218721.065513 -205153846.153846 0 0 0
0 -205153846.153846 396218721.065513 -205153846.153846 0 0
0 0 -205153846.153846 396218721.065513 -205153846.153846 0
0 0 0 -205153846.153846 396218721.065513 -205153846.153846
0 0 0 0 -205153846.153846 198109360.532757];
P2=[239737786.836378 -41030769.2307692 0 0 0 0
-41030769.2307692 239737786.836378 -205153846.153846 0 0 0
0 -205153846.153846 403860863.759455 -205153846.153846 0 0
0 0 -205153846.153846 403860863.759455 -205153846.153846 0
0 0 0 -205153846.153846 403860863.759455 -205153846.153846
0 0 0 0 -205153846.153846 201930431.879727];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq2=null([P2(2:6,:)-P2(1,:)])';
beq1=Aeq1*P1(1,:)';
beq2=Aeq2*P2(1,:)';
Aeq=[Aeq1;Aeq2];
beq=[beq1;beq2];
assert( rank([Aeq,beq])==rank(Aeq) , 'Hyperplanes do not intersect')
origin1 = pinv(Aeq)*beq;
directions1 = null(Aeq)
directions1 = 6×4
-0.1750 -0.3776 -0.5066 -0.5507
-0.5308 -0.2946 -0.1425 -0.0902
0.8120 -0.1800 -0.1745 -0.1725
-0.1258 0.8234 -0.2087 -0.2196
-0.0857 -0.1739 0.7699 -0.2493
-0.0718 -0.1730 -0.2374 0.7406
P3=[376176938.886082 -184638461.538462 0 0 0 0
-184638461.538462 376176938.886082 -205153846.153846 0 0 0
0 -205153846.153846 396692323.501467 -205153846.153846 0 0
0 0 -205153846.153846 396692323.501467 -205153846.153846 0
0 0 0 -205153846.153846 396692323.501467 -205153846.153846
0 0 0 0 -205153846.153846 198346161.750733];
Aeq1=null([P1(2:6,:)-P1(1,:)])';
Aeq3=null([P3(2:6,:)-P3(1,:)])';
beq1=Aeq1*P1(1,:)';
beq3=Aeq3*P3(1,:)';
Aeq22=[Aeq1;Aeq3];
beq22=[beq1;beq3];
assert( rank([Aeq22,beq22])==rank(Aeq22) , 'Hyperplanes do not intersect')
origin2 = pinv(Aeq22)*beq22;
directions2 = null(Aeq22)
directions2 = 6×4
-0.1807 -0.3839 -0.5148 -0.5587
-0.5343 -0.2872 -0.1249 -0.0708
0.8089 -0.1800 -0.1720 -0.1694
-0.1260 0.8228 -0.2098 -0.2208
-0.0831 -0.1746 0.7665 -0.2533
-0.0688 -0.1739 -0.2416 0.7357
The angle between directions1 and directions2 (origins are irrelevant)
theta = subspace(directions1, directions2)
theta = 0.0303
theta_degree = rad2deg(theta)
theta_degree = 1.7376
This is the same as the angle between the respective orthogonal subspaces
rad2deg(subspace(Aeq',Aeq22'))
ans = 1.7376
See Also
Categories
Find more on Linear Programming and Mixed-Integer Linear Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)