I have matrix A with size 5x3 which includes 3D (X,Y,Z) coordinates of some points like this:
A = [5.2985 0.3737 6.7050;
0.5921 2.0948 6.9703;
-4.2524 3.8338 6.9863;
-3.9856 3.708 2.7925;
-3.6727 3.58830 1.2437]
and matrix B with size 5x3 which includes 3D coordinates of another points as well like this:
B = [10.715877 -19.59950 3.575112000;
14.3055 -17.9177 6.46700;
17.67064 -16.201099 9.86076800;
14.8090 -16.30260 12.64600;
13.412823 -16.49700 13.4652810]
and vector D with size of 5x1 which includes distances error between each points of matrix A and matrix B, like this:
D = [0.001;
0.03;
0.07;
0.06;
0.6]
For example D(1,1) is the distance error between A(1) and B(1) and D(2,1) is distance error between A(2) and B(2) and so on. Now, My question is how can I plot these two 3D point data sets with their distance error lines in a same plot? and how can I show each distance line with its corresponding points in a same color? for example, point1 from matrix A and point1 from matrix B and their distance error shows with red color, then point2 from matrix A and point2 from matrix B and their distance error show with blue color and so on.
This is how it should look like:

