数据来源;阿肯色州浅层煤勘探钻孔数据 |美国地质调查局 (usgs.gov)
导入了两次数据 是删除了两次的num值;
clc,clear;
tic;
time=toc;
% 设置导入选项并导入数据
opts = delimitedTextImportOptions("NumVariables", 24);
% 指定范围和分隔符
opts.DataLines = [2, Inf];
opts.Delimiter = ",";
% 指定列名称和类型
opts.VariableNames = ["Drill_HoleName", "County", "State", "Elevation", "Depth_Total", "Lignite", "Longitude", "Latitude", "x1_C", "x1_CP", "x1_Depth", "x2_C", "x2_CP", "x2_Depth", "x3_C", "x3_CP", "x3_Depth", "x4_C", "x4_CP", "x4_Depth", "x5_C", "x5_CP", "x5_Depth", "COMMENT"];
opts.VariableTypes = ["double", "categorical", "categorical", "double", "double", "categorical", "double", "double", "double", "double", "double", "categorical", "categorical", "categorical", "categorical", "categorical", "categorical", "categorical", "categorical", "categorical", "categorical", "categorical", "categorical", "string"];
% 指定文件级属性
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";
% 指定变量属性
opts = setvaropts(opts, "COMMENT", "WhitespaceRule", "preserve");
opts = setvaropts(opts, ["County", "State", "Lignite", "x2_C", "x2_CP", "x2_Depth", "x3_C", "x3_CP", "x3_Depth", "x4_C", "x4_CP", "x4_Depth", "x5_C", "x5_CP", "x5_Depth", "COMMENT"], "EmptyFieldRule", "auto");
opts = setvaropts(opts, "Drill_HoleName", "TrimNonNumeric", true);
opts = setvaropts(opts, "Drill_HoleName", "ThousandsSeparator", ",");
% 导入数据
data = readtable("D:\AR_Attribute_Table_Final.csv", opts);
% 清除临时变量
clear opts
% 显示结果
data
data = 651×24 table
Drill_HoleName | County | State | Elevation | Depth_Total | Lignite | Longitude | Latitude | x1_C | x1_CP | x1_Depth | x2_C | x2_CP | x2_Depth | x3_C | x3_CP | x3_Depth | x4_C | x4_CP | x4_Depth | x5_C | x5_CP | x5_Depth | COMMENT | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | -1 | Clark | Arkansas | 240 | 300 | --- | -93.1038 | 33.8322 | 3 | 3 | 128 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
2 | -10 | Clark | Arkansas | 164 | 300 | --- | -92.9374 | 33.8672 | 3 | 4 | 82 | 2 | 3.5 | 97 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
3 | -11 | Clark | Arkansas | 163 | 230 | NC | -92.9794 | 33.8474 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
4 | -12 | Clark | Arkansas | 180 | 300 | --- | -92.9165 | 33.8988 | 2 | 2 | 98 | 3 | 5.5 | 129 | 2 | 3 | 204 | nd | nd | nd | nd | nd | nd | " " |
5 | -13 | Clark | Arkansas | 242 | 300 | --- | -93.0272 | 33.8549 | 2.5000 | 2.5000 | 25 | 3 | 3 | 42 | 2 | 3 | 154 | 2 | 2 | 187 | nd | nd | nd | " " |
6 | -14 | Clark | Arkansas | 192 | 300 | --- | -92.9649 | 33.9022 | 2 | 2 | 38 | 3.5 | 4.5 | 90 | 3 | 4 | 117 | 3 | 3 | 150 | 2 | 2 | 212 | " " |
7 | -15 | Clark | Arkansas | 228 | 300 | --- | -93.0045 | 33.8587 | 4 | 4 | 46 | 5 | 6 | 54 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
8 | -16 | Clark | Arkansas | 190 | 300 | --- | -92.9914 | 33.8902 | 3 | 3 | 13 | 3 | 3 | 155 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
9 | -17 | Clark | Arkansas | 209 | 300 | --- | -93.0013 | 33.9198 | 2 | 2 | 65 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
10 | -18 | Clark | Arkansas | 170 | 300 | --- | -93.0443 | 33.9075 | 2 | 2 | 35 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
11 | -19 | Clark | Arkansas | 261 | 300 | --- | -93.0087 | 33.9467 | 3.5000 | 3.5000 | 119 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
12 | -2 | Clark | Arkansas | 225 | 300 | --- | -93.0735 | 33.8388 | 2 | 2 | 100 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
13 | -20 | Clark | Arkansas | 221 | 300 | NC | -93.0556 | 33.9768 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
14 | -21 | Clark | Arkansas | 271 | 300 | --- | -93.0837 | 33.8996 | 2 | 2 | 38 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
15 | -22 | Clark | Arkansas | 276 | 300 | --- | -93.0884 | 33.8669 | 2.5000 | 2.5000 | 62 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
16 | -23 | Clark | Arkansas | 120 | 300 | --- | -92.8955 | 33.8324 | 5.5000 | 5.5000 | 278 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
17 | -24 | Clark | Arkansas | 125 | 300 | --- | -92.9271 | 33.8333 | 2.5000 | 2.5000 | 162 | 5.5 | 6.5 | 181 | 2 | 2 | 224 | nd | nd | nd | nd | nd | nd | " " |
18 | -25 | Clark | Arkansas | 179 | 300 | NC | -93.0346 | 34.0211 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
19 | -26 | Clark | Arkansas | 179 | 300 | NC | -92.9944 | 34.0740 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
20 | -27 | Clark | Arkansas | 251 | 300 | NC | -93.0302 | 33.9934 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
21 | -28 | Clark | Arkansas | 182 | 310 | NC | -92.9536 | 34.0436 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
22 | -29 | Clark | Arkansas | 168 | 300 | NC | -93.0041 | 34.0229 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
23 | -3 | Clark | Arkansas | 208 | 300 | NC | -93.0854 | 33.8143 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
24 | -30 | Clark | Arkansas | 208 | 300 | --- | -92.9335 | 34.0397 | 2 | 2 | 23 | 2 | 3.5 | 68 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
25 | -31 | Clark | Arkansas | 171 | 300 | NC | -93.0245 | 34.0428 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
26 | -32 | Clark | Arkansas | 193 | 300 | NC | -92.9234 | 34.0134 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
27 | -33 | Clark | Arkansas | 269 | 300 | --- | -92.9024 | 34.0289 | 2.5000 | 2.5000 | 186 | 2 | 2 | 200 | 3 | 3 | 218 | nd | nd | nd | nd | nd | nd | " " |
28 | -34 | Clark | Arkansas | 186 | 300 | --- | -92.9075 | 33.9896 | 3.5000 | 3.5000 | 82 | 4 | 4 | 108 | 2.5 | 3 | 186 | nd | nd | nd | nd | nd | nd | " " |
29 | -35 | Clark | Arkansas | 279 | 300 | --- | -92.9087 | 34.0579 | 3 | 3.5000 | 122 | 2 | 2 | 164 | 3 | 3 | 241 | nd | nd | nd | nd | nd | nd | " " |
30 | -36 | Clark | Arkansas | 170 | 300 | NC | -92.9316 | 33.9870 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
31 | -37 | Clark | Arkansas | 261 | 300 | --- | -92.9443 | 34.0663 | 2 | 3.5000 | 17 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
32 | -38 | Clark | Arkansas | 289 | 300 | --- | -92.9227 | 34.0857 | 3 | 3 | 27 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
33 | -39 | Clark | Arkansas | 312 | 300 | NC | -92.9235 | 34.1526 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
34 | -4 | Clark | Arkansas | 164 | 300 | NC | -93.0541 | 33.8128 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
35 | -40 | Clark | Arkansas | 288 | 270 | --- | -92.9377 | 34.1179 | 2.5000 | 4 | 19 | 3 | 3 | 36 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
36 | -41 | Clark | Arkansas | 311 | 300 | --- | -92.9088 | 34.1305 | 3 | 3 | 87 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
37 | -42 | Clark | Arkansas | 191 | 300 | NC | -92.9720 | 34.0923 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
38 | -43 | Clark | Arkansas | 337 | 300 | --- | -92.8953 | 34.0948 | 2 | 2 | 221 | 2.5 | 2.5 | 247 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
39 | -44 | Clark | Arkansas | 225 | 300 | NC | -92.9677 | 34.1155 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
40 | -45 | Clark | Arkansas | 239 | 300 | --- | -93.0205 | 33.8572 | 2.5000 | 2.5000 | 23 | 2 | 4 | 55 | 3.5 | 5 | 79 | 2.5 | 2.5 | 109 | nd | nd | nd | " " |
41 | -46 | Clark | Arkansas | 241 | 111.5000 | --- | -92.9842 | 33.9144 | 3.5000 | 5 | 79 | 2.5 | 2.5 | 109 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
42 | -47 | Clark | Arkansas | 234 | 300 | NC | -92.9718 | 33.8835 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
43 | -48 | Clark | Arkansas | 166 | 300 | NC | -92.9914 | 33.8595 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
44 | -49 | Clark | Arkansas | 152 | 220 | NC | -92.9677 | 33.9626 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
45 | -5 | Clark | Arkansas | 159 | 300 | --- | -93.0172 | 33.8144 | 2.5000 | 2.5000 | 31 | 2 | 2 | 115 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
46 | -51 | Clark | Arkansas | 188 | 149 | --- | -92.9427 | 33.9130 | 2.5000 | 2.5000 | 109 | 3.5 | 4.5 | 134 | 2 | 2 | 147 | nd | nd | nd | nd | nd | nd | " " |
47 | -52 | Clark | Arkansas | 192 | 300 | NC | -93.0900 | 33.9372 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
48 | -53 | Clark | Arkansas | 324 | 300 | --- | -93.0262 | 33.9571 | 2.5000 | 2.5000 | 124 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
49 | -54 | Clark | Arkansas | 273 | 300 | NC | -92.9508 | 34.1121 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
50 | -55 | Clark | Arkansas | 279 | 300 | NC | -92.9419 | 34.1229 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
51 | -56 | Clark | Arkansas | 312 | 51 | --- | -92.9240 | 34.1269 | 3 | 3 | 48 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
52 | -57 | Clark | Arkansas | 263 | 300 | NC | -92.9243 | 34.1412 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
53 | -6 | Clark | Arkansas | 161 | 160 | NC | -92.9979 | 33.8172 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
54 | -7 | Clark | Arkansas | 149 | 300 | --- | -92.9540 | 33.8353 | 2 | 2 | 80 | 2.5 | 2.5 | 103 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
55 | -8 | Clark | Arkansas | 161 | 275 | --- | -92.9831 | 33.8248 | 2 | 2 | 25 | 3 | 3 | 233 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
56 | -9 | Clark | Arkansas | 139 | 275 | --- | -92.9638 | 33.8182 | 3 | 3 | 112 | 2 | 2 | 212 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
57 | -1 | Cleveland | Arkansas | 235 | 290 | --- | -92.2903 | 33.7968 | 7 | 7 | 140 | 2 | 2 | 221 | 2 | 2 | 237 | nd | nd | nd | nd | nd | nd | " " |
58 | -10 | Cleveland | Arkansas | 233 | 300 | --- | -92.3247 | 33.8059 | 2 | 2 | 44 | 4.5 | 7 | 93 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
59 | -11 | Cleveland | Arkansas | 257 | 187.5000 | --- | -92.2690 | 33.8061 | 2 | 2 | 119 | 3.5 | 4.5 | 183 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
60 | -12 | Cleveland | Arkansas | 231 | 300 | --- | -92.3152 | 33.7857 | 5 | 8 | 71 | 4.5 | 4.5 | 106 | 2.5 | 3.5 | 181 | 2 | 2 | 189 | nd | nd | nd | " " |
61 | -13 | Cleveland | Arkansas | 200 | 300 | --- | -92.3204 | 33.8287 | 2 | 2 | 46 | 2 | 2 | 108 | 3 | 3 | 192 | 3 | 3 | 198 | nd | nd | nd | " " |
62 | -14 | Cleveland | Arkansas | 276 | 300 | --- | -92.2823 | 33.7562 | 2 | 2 | 36 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
63 | -15 | Cleveland | Arkansas | 232 | 300 | --- | -92.3003 | 33.8084 | 3.5000 | 3.5000 | 116 | 2.5 | 2.5 | 182 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
64 | -16 | Cleveland | Arkansas | 226 | 300 | --- | -92.2296 | 33.8067 | 3.5000 | 3.5000 | 95 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
65 | -17 | Cleveland | Arkansas | 234 | 250 | --- | -92.2468 | 33.7949 | 4 | 4 | 96 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
66 | -18 | Cleveland | Arkansas | 219 | 300 | --- | -92.2628 | 33.8256 | 4 | 4 | 148 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
67 | -19 | Cleveland | Arkansas | 200 | 300 | --- | -92.2318 | 33.8258 | 2 | 2 | 74 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
68 | -2 | Cleveland | Arkansas | 272 | 300 | --- | -92.2675 | 33.7883 | 3.5000 | 3.5000 | 124 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
69 | -20 | Cleveland | Arkansas | 188 | 300 | --- | -92.2123 | 33.8321 | 2 | 2 | 83 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
70 | -21 | Cleveland | Arkansas | 201 | 300 | --- | -92.2031 | 33.8205 | 4 | 4 | 225 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
71 | -22 | Cleveland | Arkansas | 262 | 300 | --- | -92.2905 | 33.8442 | 5 | 5 | 94 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
72 | -23 | Cleveland | Arkansas | 230 | 300 | --- | -92.1978 | 33.7773 | 3 | 4 | 234 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
73 | -24 | Cleveland | Arkansas | 241 | 300 | --- | -92.2790 | 33.8455 | 4.5000 | 4.5000 | 83 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
74 | -25 | Cleveland | Arkansas | 250 | 300 | --- | -92.3250 | 33.8501 | 3.5000 | 3.5000 | 42 | 2 | 2 | 94 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
75 | -26 | Cleveland | Arkansas | 226 | 290 | --- | -92.1998 | 33.7878 | 2.5000 | 2.5000 | 62 | 2.5 | 2.5 | 89 | 3 | 4 | 209 | nd | nd | nd | nd | nd | nd | " " |
76 | -28 | Cleveland | Arkansas | 287 | 300 | --- | -92.2557 | 33.7632 | 2 | 2 | 79 | 3 | 3 | 103 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
77 | -29 | Cleveland | Arkansas | 192 | 300 | --- | -92.3087 | 33.7603 | 2 | 2 | 84 | 2 | 2 | 91 | 2 | 2 | 150 | nd | nd | nd | nd | nd | nd | " " |
78 | -3 | Cleveland | Arkansas | 266 | 300 | --- | -92.2395 | 33.7719 | 3 | 3 | 82 | 4.5 | 4.5 | 108 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
79 | -30 | Cleveland | Arkansas | 150 | 300 | --- | -92.2269 | 33.8576 | 2 | 2 | 74 | 2 | 2 | 133 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
80 | -31 | Cleveland | Arkansas | 227 | 300 | --- | -92.3018 | 33.8751 | 3.5000 | 3.5000 | 51 | 3 | 3 | 62 | 2 | 2.5 | 81 | 6 | 6 | 199 | nd | nd | nd | " " |
81 | -33 | Cleveland | Arkansas | 187 | 280 | NC | -92.1659 | 33.7617 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
82 | -34 | Cleveland | Arkansas | 145 | 300 | NC | -92.1528 | 33.7999 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
83 | -35 | Cleveland | Arkansas | 208 | 300 | --- | -92.2837 | 33.8708 | 2 | 2 | 14 | 5 | 5 | 54 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
84 | -36 | Cleveland | Arkansas | 165 | 250 | NC | -92.2596 | 33.8672 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
85 | -37 | Cleveland | Arkansas | 262 | 300 | --- | -92.3367 | 33.8897 | 5 | 5 | 100 | 2 | 2 | 109 | 6 | 7 | 200 | nd | nd | nd | nd | nd | nd | " " |
86 | -38 | Cleveland | Arkansas | 230 | 280 | --- | -92.2151 | 33.8139 | 3 | 3 | 62 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
87 | -39 | Cleveland | Arkansas | 135 | 300 | --- | -92.1632 | 33.8500 | 2 | 2 | 31 | 3 | 3 | 153 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
88 | -4 | Cleveland | Arkansas | 231 | 300 | --- | -92.2159 | 33.7490 | 3 | 3 | 61 | 2.5 | 5 | 125 | 2 | 2 | 181 | nd | nd | nd | nd | nd | nd | " " |
89 | -40 | Cleveland | Arkansas | 170 | 280 | --- | -92.2268 | 33.8992 | 4 | 4 | 144 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
90 | -41 | Cleveland | Arkansas | 162 | 300 | --- | -92.2727 | 33.8923 | 2 | 2 | 81 | 5.5 | 5.5 | 95 | 7.5 | 7.5 | 209 | nd | nd | nd | nd | nd | nd | " " |
91 | -42 | Cleveland | Arkansas | 135 | 300 | NC | -92.1356 | 33.8069 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
92 | -43 | Cleveland | Arkansas | 231 | 300 | NC | -92.3562 | 33.8882 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
93 | -44 | Cleveland | Arkansas | 231 | 300 | --- | -92.3687 | 33.8999 | 3 | 3 | 22 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
94 | -45 | Cleveland | Arkansas | 236 | 300 | --- | -92.3131 | 33.9111 | 2.5000 | 2.5000 | 107 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
95 | -46 | Cleveland | Arkansas | 260 | 75 | --- | -92.3805 | 33.9146 | 4.5000 | 8.7000 | 50 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
96 | -47 | Cleveland | Arkansas | 240 | 240 | NC | -92.4150 | 33.9434 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
97 | -48 | Cleveland | Arkansas | 260 | 300 | NC | -92.3247 | 33.8645 | NaN | NaN | NaN | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
98 | -49 | Cleveland | Arkansas | 215 | 300 | --- | -92.3984 | 33.9221 | 3.5000 | 4.5000 | 87 | 3 | 3 | 98 | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
99 | -5 | Cleveland | Arkansas | 255 | 300 | --- | -92.1845 | 33.7373 | 2.5000 | 2.5000 | 51 | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | nd | " " |
100 | -50 | Cleveland | Arkansas | 222 | 300 | --- | -92.3454 | 33.9455 | 4.5000 | 4.5000 | 87 | 2 | 3 | 98 | 2 | 3 | 214 | nd | nd | nd | nd | nd | nd | " " |
⋮ |
x = data(:,7); %Easting coordinates in km
y = data(:,8); %Northing coordinates in km
z = data(:,4); %Elevation coordinates in km
%Continuous variables
c1 = data(:,10); %C1 grade in ppm
%Categorical variable
Alte = data(:,7); %Geological alteration unit
%Step size and radius inputs
X1 = table2array(x)/0.00001141; Y1 = table2array(y)/0.00000899; Z1 = table2array(z)/3.2808399;
%这里要绘制四维 mesh只能绘制三维的曲面
scatter3(X1,Y1,Z1)%散点图
ax = gca;
ay.XDir = 'reverse';
xlabel('经度');ylabel('纬度');zlabel('海拔')%添加经纬度和高度
data2 = 327×12 table
Drill_HoleName | County | State | Elevation | Depth_Total | Lignite | Longitude | Latitude | x1_C | x1_CP | x1_Depth | COMMENT | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | "C-1" | Clark | Arkansas | 240 | 300 | --- | -93.1038 | 33.8322 | 3 | 3 | 128 | " " |
2 | "C-10" | Clark | Arkansas | 164 | 300 | --- | -92.9374 | 33.8672 | 3 | 4 | 82 | " " |
3 | "C-12" | Clark | Arkansas | 180 | 300 | --- | -92.9165 | 33.8988 | 2 | 2 | 98 | " " |
4 | "C-13" | Clark | Arkansas | 242 | 300 | --- | -93.0272 | 33.8549 | 2.5000 | 2.5000 | 25 | " " |
5 | "C-14" | Clark | Arkansas | 192 | 300 | --- | -92.9649 | 33.9022 | 2 | 2 | 38 | " " |
6 | "C-15C" | Clark | Arkansas | 228 | 300 | --- | -93.0045 | 33.8587 | 4 | 4 | 46 | " " |
7 | "C-16" | Clark | Arkansas | 190 | 300 | --- | -92.9914 | 33.8902 | 3 | 3 | 13 | " " |
8 | "C-17" | Clark | Arkansas | 209 | 300 | --- | -93.0013 | 33.9198 | 2 | 2 | 65 | " " |
9 | "C-18" | Clark | Arkansas | 170 | 300 | --- | -93.0443 | 33.9075 | 2 | 2 | 35 | " " |
10 | "C-19" | Clark | Arkansas | 261 | 300 | --- | -93.0087 | 33.9467 | 3.5000 | 3.5000 | 119 | " " |
11 | "C-2" | Clark | Arkansas | 225 | 300 | --- | -93.0735 | 33.8388 | 2 | 2 | 100 | " " |
12 | "C-21" | Clark | Arkansas | 271 | 300 | --- | -93.0837 | 33.8996 | 2 | 2 | 38 | " " |
13 | "C-22" | Clark | Arkansas | 276 | 300 | --- | -93.0884 | 33.8669 | 2.5000 | 2.5000 | 62 | " " |
14 | "C-23" | Clark | Arkansas | 120 | 300 | --- | -92.8955 | 33.8324 | 5.5000 | 5.5000 | 278 | " " |
15 | "C-24" | Clark | Arkansas | 125 | 300 | --- | -92.9271 | 33.8333 | 2.5000 | 2.5000 | 162 | " " |
16 | "C-30" | Clark | Arkansas | 208 | 300 | --- | -92.9335 | 34.0397 | 2 | 2 | 23 | " " |
17 | "C-33" | Clark | Arkansas | 269 | 300 | --- | -92.9024 | 34.0289 | 2.5000 | 2.5000 | 186 | " " |
18 | "C-34" | Clark | Arkansas | 186 | 300 | --- | -92.9075 | 33.9896 | 3.5000 | 3.5000 | 82 | " " |
19 | "C-35" | Clark | Arkansas | 279 | 300 | --- | -92.9087 | 34.0579 | 3 | 3.5000 | 122 | " " |
20 | "C-37" | Clark | Arkansas | 261 | 300 | --- | -92.9443 | 34.0663 | 2 | 3.5000 | 17 | " " |
21 | "C-38" | Clark | Arkansas | 289 | 300 | --- | -92.9227 | 34.0857 | 3 | 3 | 27 | " " |
22 | "C-40C" | Clark | Arkansas | 288 | 270 | --- | -92.9377 | 34.1179 | 2.5000 | 4 | 19 | " " |
23 | "C-41" | Clark | Arkansas | 311 | 300 | --- | -92.9088 | 34.1305 | 3 | 3 | 87 | " " |
24 | "C-43" | Clark | Arkansas | 337 | 300 | --- | -92.8953 | 34.0948 | 2 | 2 | 221 | " " |
25 | "C-45" | Clark | Arkansas | 239 | 300 | --- | -93.0205 | 33.8572 | 2.5000 | 2.5000 | 23 | " " |
26 | "C-46" | Clark | Arkansas | 241 | 111.5000 | --- | -92.9842 | 33.9144 | 3.5000 | 5 | 79 | " " |
27 | "C-5" | Clark | Arkansas | 159 | 300 | --- | -93.0172 | 33.8144 | 2.5000 | 2.5000 | 31 | " " |
28 | "C-51" | Clark | Arkansas | 188 | 149 | --- | -92.9427 | 33.9130 | 2.5000 | 2.5000 | 109 | " " |
29 | "C-53" | Clark | Arkansas | 324 | 300 | --- | -93.0262 | 33.9571 | 2.5000 | 2.5000 | 124 | " " |
30 | "C-56C" | Clark | Arkansas | 312 | 51 | --- | -92.9240 | 34.1269 | 3 | 3 | 48 | " " |
31 | "C-7" | Clark | Arkansas | 149 | 300 | --- | -92.9540 | 33.8353 | 2 | 2 | 80 | " " |
32 | "C-8" | Clark | Arkansas | 161 | 275 | --- | -92.9831 | 33.8248 | 2 | 2 | 25 | " " |
33 | "C-9" | Clark | Arkansas | 139 | 275 | --- | -92.9638 | 33.8182 | 3 | 3 | 112 | " " |
34 | "CL-1" | Cleveland | Arkansas | 235 | 290 | --- | -92.2903 | 33.7968 | 7 | 7 | 140 | " " |
35 | "CL-10" | Cleveland | Arkansas | 233 | 300 | --- | -92.3247 | 33.8059 | 2 | 2 | 44 | " " |
36 | "CL-11" | Cleveland | Arkansas | 257 | 187.5000 | --- | -92.2690 | 33.8061 | 2 | 2 | 119 | " " |
37 | "CL-12C" | Cleveland | Arkansas | 231 | 300 | --- | -92.3152 | 33.7857 | 5 | 8 | 71 | " " |
38 | "CL-13" | Cleveland | Arkansas | 200 | 300 | --- | -92.3204 | 33.8287 | 2 | 2 | 46 | " " |
39 | "CL-14" | Cleveland | Arkansas | 276 | 300 | --- | -92.2823 | 33.7562 | 2 | 2 | 36 | " " |
40 | "CL-15" | Cleveland | Arkansas | 232 | 300 | --- | -92.3003 | 33.8084 | 3.5000 | 3.5000 | 116 | " " |
41 | "CL-16" | Cleveland | Arkansas | 226 | 300 | --- | -92.2296 | 33.8067 | 3.5000 | 3.5000 | 95 | " " |
42 | "CL-17" | Cleveland | Arkansas | 234 | 250 | --- | -92.2468 | 33.7949 | 4 | 4 | 96 | " " |
43 | "CL-18" | Cleveland | Arkansas | 219 | 300 | --- | -92.2628 | 33.8256 | 4 | 4 | 148 | " " |
44 | "CL-19" | Cleveland | Arkansas | 200 | 300 | --- | -92.2318 | 33.8258 | 2 | 2 | 74 | " " |
45 | "CL-2" | Cleveland | Arkansas | 272 | 300 | --- | -92.2675 | 33.7883 | 3.5000 | 3.5000 | 124 | " " |
46 | "CL-20" | Cleveland | Arkansas | 188 | 300 | --- | -92.2123 | 33.8321 | 2 | 2 | 83 | " " |
47 | "CL-21" | Cleveland | Arkansas | 201 | 300 | --- | -92.2031 | 33.8205 | 4 | 4 | 225 | " " |
48 | "CL-22" | Cleveland | Arkansas | 262 | 300 | --- | -92.2905 | 33.8442 | 5 | 5 | 94 | " " |
49 | "CL-23" | Cleveland | Arkansas | 230 | 300 | --- | -92.1978 | 33.7773 | 3 | 4 | 234 | " " |
50 | "CL-24" | Cleveland | Arkansas | 241 | 300 | --- | -92.2790 | 33.8455 | 4.5000 | 4.5000 | 83 | " " |
51 | "CL-25" | Cleveland | Arkansas | 250 | 300 | --- | -92.3250 | 33.8501 | 3.5000 | 3.5000 | 42 | " " |
52 | "CL-26" | Cleveland | Arkansas | 226 | 290 | --- | -92.1998 | 33.7878 | 2.5000 | 2.5000 | 62 | " " |
53 | "CL-28" | Cleveland | Arkansas | 287 | 300 | --- | -92.2557 | 33.7632 | 2 | 2 | 79 | " " |
54 | "CL-29" | Cleveland | Arkansas | 192 | 300 | --- | -92.3087 | 33.7603 | 2 | 2 | 84 | " " |
55 | "CL-3" | Cleveland | Arkansas | 266 | 300 | --- | -92.2395 | 33.7719 | 3 | 3 | 82 | " " |
56 | "CL-30" | Cleveland | Arkansas | 150 | 300 | --- | -92.2269 | 33.8576 | 2 | 2 | 74 | " " |
57 | "CL-31" | Cleveland | Arkansas | 227 | 300 | --- | -92.3018 | 33.8751 | 3.5000 | 3.5000 | 51 | " " |
58 | "CL-35" | Cleveland | Arkansas | 208 | 300 | --- | -92.2837 | 33.8708 | 2 | 2 | 14 | " " |
59 | "CL-37" | Cleveland | Arkansas | 262 | 300 | --- | -92.3367 | 33.8897 | 5 | 5 | 100 | " " |
60 | "CL-38" | Cleveland | Arkansas | 230 | 280 | --- | -92.2151 | 33.8139 | 3 | 3 | 62 | " " |
61 | "CL-39" | Cleveland | Arkansas | 135 | 300 | --- | -92.1632 | 33.8500 | 2 | 2 | 31 | " " |
62 | "CL-4" | Cleveland | Arkansas | 231 | 300 | --- | -92.2159 | 33.7490 | 3 | 3 | 61 | " " |
63 | "CL-40" | Cleveland | Arkansas | 170 | 280 | --- | -92.2268 | 33.8992 | 4 | 4 | 144 | " " |
64 | "CL-41" | Cleveland | Arkansas | 162 | 300 | --- | -92.2727 | 33.8923 | 2 | 2 | 81 | " " |
65 | "CL-44" | Cleveland | Arkansas | 231 | 300 | --- | -92.3687 | 33.8999 | 3 | 3 | 22 | " " |
66 | "CL-45" | Cleveland | Arkansas | 236 | 300 | --- | -92.3131 | 33.9111 | 2.5000 | 2.5000 | 107 | " " |
67 | "CL-46C" | Cleveland | Arkansas | 260 | 75 | --- | -92.3805 | 33.9146 | 4.5000 | 8.7000 | 50 | " " |
68 | "CL-49" | Cleveland | Arkansas | 215 | 300 | --- | -92.3984 | 33.9221 | 3.5000 | 4.5000 | 87 | " " |
69 | "CL-5" | Cleveland | Arkansas | 255 | 300 | --- | -92.1845 | 33.7373 | 2.5000 | 2.5000 | 51 | " " |
70 | "CL-50" | Cleveland | Arkansas | 222 | 300 | --- | -92.3454 | 33.9455 | 4.5000 | 4.5000 | 87 | " " |
71 | "CL-51" | Cleveland | Arkansas | 277 | 300 | Poor | -92.4084 | 33.9694 | 3 | 3 | 61 | " " |
72 | "CL-52" | Cleveland | Arkansas | 212 | 300 | --- | -92.3241 | 33.9323 | 4.5000 | 4.5000 | 97 | " " |
73 | "CL-53C" | Cleveland | Arkansas | 197 | 60 | --- | -92.2932 | 33.8555 | 4.3000 | 4.3000 | 37.7000 | " " |
74 | "CL-54" | Cleveland | Arkansas | 250 | 260 | --- | -92.3420 | 33.8794 | 2 | 3 | 60 | " " |
75 | "CL-55" | Cleveland | Arkansas | 245 | 300 | --- | -92.4369 | 33.9691 | 2 | 2 | 71 | " " |
76 | "CL-56" | Cleveland | Arkansas | 230 | 300 | --- | -92.2198 | 33.7827 | 2.5000 | 2.5000 | 49 | " " |
77 | "CL-57" | Cleveland | Arkansas | 245 | 300 | --- | -92.2112 | 33.7681 | 2 | 3 | 98 | " " |
78 | "CL-58" | Cleveland | Arkansas | 205 | 300 | --- | -92.3088 | 33.7937 | 4 | 4 | 61 | " " |
79 | "CL-59" | Cleveland | Arkansas | 154 | 300 | --- | -92.1833 | 33.8326 | 2.5000 | 3.5000 | 93 | " " |
80 | "CL-60" | Cleveland | Arkansas | 165 | 300 | --- | -92.2686 | 33.8759 | 3.5000 | 3.5000 | 44 | " " |
81 | "CL-62" | Cleveland | Arkansas | 216 | 300 | --- | -92.2210 | 33.9226 | 3.5000 | 4.5000 | 227 | " " |
82 | "CL-70" | Cleveland | Arkansas | 170 | 300 | --- | -92.3256 | 33.7644 | 2 | 3.5000 | 47 | " " |
83 | "CL-72" | Cleveland | Arkansas | 290 | 300 | --- | -92.2820 | 33.8210 | 4 | 4 | 209 | " " |
84 | "CL-73" | Cleveland | Arkansas | 231 | 300 | --- | -92.2002 | 33.7439 | 3 | 3 | 61 | " " |
85 | "CL-74" | Cleveland | Arkansas | 247 | 300 | --- | -92.4148 | 33.9945 | 2 | 2 | 105 | " " |
86 | "CL-76" | Cleveland | Arkansas | 221 | 300 | --- | -92.3991 | 33.9354 | 2 | 2 | 68 | " " |
87 | "CL-77" | Cleveland | Arkansas | 240 | 300 | --- | -92.2262 | 33.7488 | 2.5000 | 2.5000 | 130 | " " |
88 | "CL-78" | Cleveland | Arkansas | 193 | 300 | --- | -92.1690 | 33.7954 | 2 | 2 | 64 | " " |
89 | "CL-80" | Cleveland | Arkansas | 251 | 300 | --- | -92.3024 | 33.8248 | 3.5000 | 3.5000 | 87 | " " |
90 | "CL-81" | Cleveland | Arkansas | 182 | 300 | --- | -92.2227 | 33.9089 | 4 | 6 | 148 | " " |
91 | "CL-82" | Cleveland | Arkansas | 153 | 300 | --- | -92.3021 | 33.9378 | 2 | 3.5000 | 83 | " " |
92 | "CL-83C" | Cleveland | Arkansas | 143 | 140 | --- | -92.2630 | 33.9180 | 4.7000 | 5.1000 | 115.3000 | " " |
93 | "CL-86" | Cleveland | Arkansas | 249 | 300 | --- | -92.4112 | 34.0063 | 2 | 2 | 142 | " " |
94 | "CL-96" | Cleveland | Arkansas | 160 | 300 | --- | -92.2562 | 33.8803 | 4 | 4 | 94 | " " |
95 | "CN-1" | Calhoun | Arkansas | 185 | 300 | --- | -92.3486 | 33.7954 | 3 | 3 | 88 | " " |
96 | "CN-10" | Calhoun | Arkansas | 330 | 277 | --- | -92.4589 | 33.7966 | 2 | 2 | 97 | " " |
97 | "CN-11" | Calhoun | Arkansas | 271 | 300 | --- | -92.4315 | 33.7569 | 3 | 4 | 70 | " " |
98 | "CN-12" | Calhoun | Arkansas | 277 | 300 | --- | -92.4526 | 33.7566 | 4 | 4 | 45 | " " |
99 | "CN-13" | Calhoun | Arkansas | 271 | 200 | --- | -92.4175 | 33.7558 | 4 | 4 | 66 | " " |
100 | "CN-14" | Calhoun | Arkansas | 266 | 300 | --- | -92.4045 | 33.7324 | 2 | 2 | 31 | " " |
⋮ |
figure
[X,Y,Z]=griddata(X1,Y1,Z1,linspace(min(X1),max(X1),200)',linspace(min(Y1),max(Y1),200),'v4');%插值
pcolor(X,Y,Z);shading interp%伪彩色图set(gca,'Visible','off')
contourf(X,Y,Z) %等高线图
xlabel('经度');ylabel('纬度');zlabel('海拔')%添加经纬度和高度
mesh(X,Y,Z,'EdgeColor','none','EdgeLighting','Phong',...
'FaceColor','interp');%三维曲面
colorbar; % 显示颜色条
xlabel('经度');ylabel('纬度');zlabel('海拔')%添加经纬度和高度
colorbar; % 显示颜色条
figure,meshc(X,Y,Z)%剖面图
xlabel('经度');ylabel('纬度');zlabel('海拔')%添加经纬度和高度
colorbar; % 显示颜色条
view(0,0);
figure,meshc(X,Y,Z);%s三维曲面(浅色)+等高线
xlabel('经度');ylabel('纬度');zlabel('海拔')%添加经纬度和高度
colorbar; % 显示颜色条
hidden off;
axis vis3d %3维坐标系
set(gca,'Visible','off')
for i = 1:72
camorbit(10,0,'data',[0 0 1]) %%[0 0 1]表示按z轴旋转。36*10=360表示旋转一周
drawnow %%即时显示旋转的结果
end
x2 = data2(:,7); %Easting coordinates in km
y2 = data2(:,8); %Northing coordinates in km
z2 = data2(:,4); %Elevation coordinates in km
d2 = data2(:,11);
d3 = table2array(d2)/3.2808399;
X3 = table2array(x2)/0.00001141; Y3 = table2array(y2)/0.00000899; Z2 = table2array(z2)/3.2808399;
Z3 = Z2-d3;Z4 = Z3;% Z3 Z4为煤层的海拔
c = data2(:,10); %C1 grade in ppm
C = table2array(c);
%plot3(X1,Y1,Z) 这是连在一起的三维曲线图
[XX,YY,CC]=griddata(X3,Y3,Z3,linspace(min(X3),max(X3),200)',linspace(min(Y3),max(Y3),200),'V4');%插值
figure
axis vis3d;
% scatter3(x,y,z,点的尺寸,颜色,点的形状)
x2 = data2(:,7); %Easting coordinates in km
y2 = data2(:,8); %Northing coordinates in km
z2 = data2(:,4); %Elevation coordinates in km
d2 = data2(:,11);
d3 = table2array(d2)/3.2808399;
X3 = table2array(x2)/0.00001141; Y3 = table2array(y2)/0.00000899; Z2 = table2array(z2)/3.2808399;%将经纬度和海拔转化为米
Z3 = Z2-d3;Z4 = Z3;%L = linspace(Z3,d3,200)% linsapce输入必须为标量 即标量转化为数组
for i = 1:327
L = [ones*Z3(i,1) ones*Z2(i,1)];%将z3和d3之间的200个数以数组的方式赋予原胞数组的第一个数据
X5 = [ones*X3(i,1) ones*X3(i,1)];Y5 = [ones*Y3(i,1) ones*Y3(i,1)];
%plot3(X3(i,1),Y3(i,1),L,'Color','r','LineWidth',2);hold on; 无法生成图像
plot3(X5,Y5,L,'Color','b','LineWidth',1);hold on;
end
meshc(X,Y,Z);%s三维曲面(浅色)+等高线
xlabel('经度');ylabel('纬度');zlabel('海拔');%添加经纬度和高度
hold on;
scatter3(X3,Y3,Z4,C.^2,'r','filled');
hold on;
%mesh(XX,YY,CC);%s三维曲面(浅色)
hold on;
axis vis3d %3维坐标系
set(gca,'Visible','off')
view(0.5,0.5)
for i = 1:72
camorbit(10,0,'data',[0 0 1]) %%[0 0 1]表示按z轴旋转。36*10=360表示旋转一周
drawnow %%即时显示旋转的结果
end
disp(['用直接赋值方式,time=',num2str(time),'秒.'])