MATLAB: Deleting the same value in a 98×3 matrix

MATLABmatrix array

Hello,
Is there a way to delete all the lines that have the values 0 , 0 , 0 in my matrix ?
TY
65.8388184896437 -8.66784489236480 -32.7482782537025
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
74.7814547309264 30.9754927635394 16.1005365669161
73.0967785217583 30.2776770294946 21.1999747640069
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
66.9978297845648 33.0396733122820 9.83465235993205
64.2993952550978 31.7089526666304 14.2606016873863
63.2665736171811 31.1996213999856 18.9014857109357
63.7736611131528 31.4496892792217 24.1374722027722
68.5891904480056 33.8244455446240 31.6773736117830
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
65.3037212039433 37.7031210161810 4.94238622068496
61.3851514803117 35.4407337314039 9.33172222413838
59.3864636643047 34.2867907828062 13.6401334489180
58.4792983997548 33.7630386731189 18.0935578929659
58.6040284300040 33.8350515896593 22.9709047219438
60.4010579758195 34.8725670816776 28.8893804799928
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
60.9141619668766 40.7015417730232 4.80176912147286
57.7075802206670 38.5589723494639 9.13725162455051
55.9564502571001 37.3889047155881 13.3864543287144
55.1172848909139 36.8281923442208 17.7620826510045
55.1449380810385 36.8466696151324 22.5133712758637
56.4611734673568 37.7261499827437 28.1272862551342
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
58.1581687480155 44.6263324517868 4.80477938031820
55.0884170103121 42.2708290970517 9.14161108199433
53.4142232845301 40.9861750681541 13.3922037832112
52.6128561387919 40.3712644299495 17.7696010061658
52.6410173647158 40.3928732986155 22.5236557632618
53.9043663415539 41.3622750637790 28.1437267303910
0 0 0
0 0 0
0 0 0
0 0 0
56.8248128347137 49.8340233700126 4.95384119059042
53.3767842654827 46.8101834710704 9.34665455570587
51.6290042632147 45.2774215465920 13.6593558378959
50.8392065369998 44.5847875301763 18.1186526703151
50.9546333143460 44.6860140971080 23.0059210955786
52.5487138930374 46.0839852447343 28.9508346900988
0 0 0
0 0 0
53.0208520705470 53.0208520705470 9.87167396073640
50.8471257259591 50.8471257259591 14.3035287197074
50.0272236266827 50.0272236266827 18.9571851479733
50.4560211503955 50.4560211503955 24.2219587203814
54.8802760945021 54.8802760945021 32.1481214293794

Best Answer

  • M(~any(M, 2), :) = []; % M is the matrix given in the question