compute iterations to calculate pairs of data that do not repeat

1 次查看(过去 30 天)
Hi there I have 15 sets of x,y,z data points. I want to compute 105 possible combinations of these points using a computational method. I believe I will want to use a loop although I am not sure how to set one up that discards any repeating combinations.
This is the code I have:
% script to caluclate the correlation dimension of points
% with delta[log N_D (R)] / delta (log R) ( taken from Kagan.Y (2007)
% Earthquake spacial distribution: The correlation dimension.
% where
% D = dimensionality = 3-D
% N = total number of earthquake pairs = n(n-1)/2
% R = distance between points = sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)
N = 15*(15-1)/2 %the number of pairs I can have
% The Data set (15 points)
x_vals=[-9.33203 -9.92969 -9.40234 -9.47266 -8.83984 -9.50781 -10.0703 -9.08594 -9.50781 -10.0352 -9.12109 -9.05078 -9.26172 -9.82422 -10.3516];
y_vals=[27.8633 27.6172 27.6523 27.5117 27.9336 27.6172 27.3359 27.6172 27.6172 27.2305 27.9336 28.0039 27.793 27.7227 26.7734];
z_vals=[10.0098 8.04297 8.97461 7.98086 9.51289 8.04297 10.1133 10.0305 7.96016 7.98086 9.47148 7.77383 8.76758 9.34727 7.79453];
Any help would be much appreciated!

采纳的回答

KSSV
KSSV 2019-4-16
  3 个评论
P_L
P_L 2019-4-16
Hi KSSV I don't understand, please could you explain more clearly? I need combinations of x,y and z data.
Many thanks

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Earthquake Engineering 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by