How to create square symetric criterion matrix for random numbers of points
Show older comments
Hi! I have a problem creating matrix of 2D geodetic network.
I would really appreciate if someone knows how to make it!
Matrix should have such form:
- Number of points and cooridnates of points are random!
- On the main diagonal of a square and symmetric matrix there are only numbers 1 (where lies x1, x2, ...xn,yn)!! - this are like variances
- On the other places i have to compute distance between any number of points (d12, d13,...d1n) - this are like covariances
C = [x1 0 d12 0 d13 0 d14 0 ... d1n 0;
0 y1 0 d12 0 d13 0 d14 ... 0 d1n;
d12 0 x2 0 d23 0 d24 0 ... d2n 0;
0 d12 0 y2 0 d23 0 d24 ... 0 d2n;
d13 0 d23 0 x3 0 d34 0 ... d3n 0;
0 d13 0 d23 0 y3 0 d34 ... 0 d3n;
d14 0 d24 0 d34 0 x4 0 ... d4n 0;
0 d14 0 d24 0 d34 0 y4 ... 0 d4n;
. . . . . . . . ... . .
. . . . . . . . ... . .
. . . . . . . . ... . .
dn1 0 dn2 0 dn3 0 dn4 0 ... xn 0;
0 dn1 0 dn2 0 dn3 0 dn4 ... 0 yn];
Thank you,
bye!
Answers (0)
Categories
Find more on Gaussian Process Regression 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!