# how to delete multiple cells at once?

5 visualizaciones (últimos 30 días)
gravy el 1 de Feb. de 2024
Movida: Dyuman Joshi el 1 de Feb. de 2024
I have a cell
p =
1×500 cell array
Columns 1 through 8
{[0]} {[26.2030]} {[52.4059]} {[78.6089]} {[104.8118]} {[131.0148]} {[157.2178]} {[183.4207]}
Columns 9 through 16
{[209.6237]} {[235.8267]} {[262.0296]} {[288.2326]} {[314.4355]} {[340.6385]} {[366.8415]} {[393.0444]}
Columns 17 through 24
{[419.2474]} {[445.4503]} {[471.6533]} {[497.8563]} {[524.0592]} {[550.2622]} {[576.4651]} {[602.6681]}
Columns 25 through 32
{[628.8711]} {[655.0740]} {[681.2770]} {[707.4800]} {[733.6829]} {[759.8859]} {[786.0888]} {[812.2918]}
Columns 33 through 40
{[838.4948]} {[864.6977]} {[890.9007]} {[917.1036]} {[943.3066]} {[969.5096]} {[995.7125]} {[1.0219e+03]}
Columns 41 through 47
{[1.0481e+03]} {[1.0743e+03]} {[1.1005e+03]} {[1.1267e+03]} {[1.1529e+03]} {[1.1791e+03]} {[1.2053e+03]}
Columns 48 through 54
{[1.2315e+03]} {[1.2577e+03]} {[1.2839e+03]} {[1.3101e+03]} {[1.3364e+03]} {[1.3626e+03]} {[1.3888e+03]}
Columns 55 through 61
{[1.4150e+03]} {[1.4412e+03]} {[1.4674e+03]} {[1.4936e+03]} {[1.5198e+03]} {[1.5460e+03]} {[1.5722e+03]}
Columns 62 through 68
{[1.5984e+03]} {[1.6246e+03]} {[1.6508e+03]} {[1.6770e+03]} {[1.7032e+03]} {[1.7294e+03]} {[1.7556e+03]}
Columns 69 through 75
{[1.7818e+03]} {[1.8080e+03]} {[1.8342e+03]} {[1.8604e+03]} {[1.8866e+03]} {[1.9128e+03]} {[1.9390e+03]}
Columns 76 through 82
{[1.9652e+03]} {[1.9914e+03]} {[2.0176e+03]} {[2.0438e+03]} {[2.0700e+03]} {[2.0962e+03]} {[2.1224e+03]}
Columns 83 through 89
{[2.1486e+03]} {[2.1748e+03]} {[2.2010e+03]} {[2.2273e+03]} {[2.2535e+03]} {[2.2797e+03]} {[2.3059e+03]}
Columns 90 through 96
{[2.3321e+03]} {[2.3583e+03]} {[2.3845e+03]} {[2.4107e+03]} {[2.4369e+03]} {[2.4631e+03]} {[2.4893e+03]}
Columns 97 through 103
{[2.5155e+03]} {[2.5417e+03]} {[2.5679e+03]} {[2.5941e+03]} {[2.6203e+03]} {[2.6465e+03]} {[2.6727e+03]}
Columns 104 through 110
{[2.6989e+03]} {[2.7251e+03]} {[2.7513e+03]} {[2.7775e+03]} {[2.8037e+03]} {[2.8299e+03]} {[2.8561e+03]}
Columns 111 through 117
{[2.8823e+03]} {[2.9085e+03]} {[2.9347e+03]} {[2.9609e+03]} {[2.9871e+03]} {[3.0133e+03]} {[3.0395e+03]}
Columns 118 through 124
{[3.0657e+03]} {[3.0919e+03]} {[3.1182e+03]} {[3.1444e+03]} {[3.1706e+03]} {[3.1968e+03]} {[3.2230e+03]}
Columns 125 through 131
{[3.2492e+03]} {[3.2754e+03]} {[3.3016e+03]} {[3.3278e+03]} {[3.3540e+03]} {[3.3802e+03]} {[3.4064e+03]}
Columns 132 through 138
{[3.4326e+03]} {[3.4588e+03]} {[3.4850e+03]} {[3.5112e+03]} {[3.5374e+03]} {[3.5636e+03]} {[3.5898e+03]}
Columns 139 through 145
{[3.6160e+03]} {[3.6422e+03]} {[3.6684e+03]} {[3.6946e+03]} {[3.7208e+03]} {[3.7470e+03]} {[3.7732e+03]}
Columns 146 through 152
{[3.7994e+03]} {[3.8256e+03]} {[3.8518e+03]} {[3.8780e+03]} {[3.9042e+03]} {[3.9304e+03]} {[3.9566e+03]}
Columns 153 through 159
{[3.9829e+03]} {[4.0091e+03]} {[4.0353e+03]} {[4.0615e+03]} {[4.0877e+03]} {[4.1139e+03]} {[4.1401e+03]}
Columns 160 through 166
{[4.1663e+03]} {[4.1925e+03]} {[4.2187e+03]} {[4.2449e+03]} {[4.2711e+03]} {[4.2973e+03]} {[4.3235e+03]}
Columns 167 through 173
{[4.3497e+03]} {[4.3759e+03]} {[4.4021e+03]} {[4.4283e+03]} {[4.4545e+03]} {[4.4807e+03]} {[4.5069e+03]}
Columns 174 through 180
{[4.5331e+03]} {[4.5593e+03]} {[4.5855e+03]} {[4.6117e+03]} {[4.6379e+03]} {[4.6641e+03]} {[4.6903e+03]}
Columns 181 through 187
{[4.7165e+03]} {[4.7427e+03]} {[4.7689e+03]} {[4.7951e+03]} {[4.8213e+03]} {[4.8475e+03]} {[4.8738e+03]}
Columns 188 through 194
{[4.9000e+03]} {[4.9262e+03]} {[4.9524e+03]} {[4.9786e+03]} {[5.0048e+03]} {[5.0310e+03]} {[5.0572e+03]}
Columns 195 through 201
{[5.0834e+03]} {[5.1096e+03]} {[5.1358e+03]} {[5.1620e+03]} {[5.1882e+03]} {[5.2144e+03]} {[5.2406e+03]}
Columns 202 through 208
{[5.2668e+03]} {[5.2930e+03]} {[5.3192e+03]} {[5.3454e+03]} {[5.3716e+03]} {[5.3978e+03]} {[5.4240e+03]}
Columns 209 through 215
{[5.4502e+03]} {[5.4764e+03]} {[5.5026e+03]} {[5.5288e+03]} {[5.5550e+03]} {[5.5812e+03]} {[5.6074e+03]}
Columns 216 through 222
{[5.6336e+03]} {[5.6598e+03]} {[5.6860e+03]} {[5.7122e+03]} {[5.7384e+03]} {[5.7647e+03]} {[5.7909e+03]}
Columns 223 through 229
{[5.8171e+03]} {[5.8433e+03]} {[5.8695e+03]} {[5.8957e+03]} {[5.9219e+03]} {[5.9481e+03]} {[5.9743e+03]}
Columns 230 through 236
{[6.0005e+03]} {[6.0267e+03]} {[6.0529e+03]} {[6.0791e+03]} {[6.1053e+03]} {[6.1315e+03]} {[6.1577e+03]}
Columns 237 through 243
{[6.1839e+03]} {[6.2101e+03]} {[6.2363e+03]} {[6.2625e+03]} {[6.2887e+03]} {[6.3149e+03]} {[6.3411e+03]}
Columns 244 through 250
{[6.3673e+03]} {[6.3935e+03]} {[6.4197e+03]} {[6.4459e+03]} {[6.4721e+03]} {[6.4983e+03]} {[6.5245e+03]}
Columns 251 through 257
{[6.5507e+03]} {[6.5769e+03]} {[6.6031e+03]} {[6.6293e+03]} {[6.6556e+03]} {[6.6818e+03]} {[6.7080e+03]}
Columns 258 through 264
{[6.7342e+03]} {[6.7604e+03]} {[6.7866e+03]} {[6.8128e+03]} {[6.8390e+03]} {[6.8652e+03]} {[6.8914e+03]}
Columns 265 through 271
{[6.9176e+03]} {[6.9438e+03]} {[6.9700e+03]} {[6.9962e+03]} {[7.0224e+03]} {[7.0486e+03]} {[7.0748e+03]}
Columns 272 through 278
{[7.1010e+03]} {[7.1272e+03]} {[7.1534e+03]} {[7.1796e+03]} {[7.2058e+03]} {[7.2320e+03]} {[7.2582e+03]}
Columns 279 through 285
{[7.2844e+03]} {[7.3106e+03]} {[7.3368e+03]} {[7.3630e+03]} {[7.3892e+03]} {[7.4154e+03]} {[7.4416e+03]}
Columns 286 through 292
{[7.4678e+03]} {[7.4940e+03]} {[7.5202e+03]} {[7.5465e+03]} {[7.5727e+03]} {[7.5989e+03]} {[7.6251e+03]}
Columns 293 through 299
{[7.6513e+03]} {[7.6775e+03]} {[7.7037e+03]} {[7.7299e+03]} {[7.7561e+03]} {[7.7823e+03]} {[7.8085e+03]}
Columns 300 through 306
{[7.8347e+03]} {[7.8609e+03]} {[7.8871e+03]} {[7.9133e+03]} {[7.9395e+03]} {[7.9657e+03]} {[7.9919e+03]}
Columns 307 through 313
{[8.0181e+03]} {[8.0443e+03]} {[8.0705e+03]} {[8.0967e+03]} {[8.1229e+03]} {[8.1491e+03]} {[8.1753e+03]}
Columns 314 through 320
{[8.2015e+03]} {[8.2277e+03]} {[8.2539e+03]} {[8.2801e+03]} {[8.3063e+03]} {[8.3325e+03]} {[8.3587e+03]}
Columns 321 through 327
{[8.3849e+03]} {[8.4112e+03]} {[8.4374e+03]} {[8.4636e+03]} {[8.4898e+03]} {[8.5160e+03]} {[8.5422e+03]}
Columns 328 through 334
{[8.5684e+03]} {[8.5946e+03]} {[8.6208e+03]} {[8.6470e+03]} {[8.6732e+03]} {[8.6994e+03]} {[8.7256e+03]}
Columns 335 through 341
{[8.7518e+03]} {[8.7780e+03]} {[8.8042e+03]} {[8.8304e+03]} {[8.8566e+03]} {[8.8828e+03]} {[8.9090e+03]}
Columns 342 through 348
{[8.9352e+03]} {[8.9614e+03]} {[8.9876e+03]} {[9.0138e+03]} {[9.0400e+03]} {[9.0662e+03]} {[9.0924e+03]}
Columns 349 through 355
{[9.1186e+03]} {[9.1448e+03]} {[9.1710e+03]} {[9.1972e+03]} {[9.2234e+03]} {[9.2496e+03]} {[9.2758e+03]}
Columns 356 through 362
{[9.3021e+03]} {[9.3283e+03]} {[9.3545e+03]} {[9.3807e+03]} {[9.4069e+03]} {[9.4331e+03]} {[9.4593e+03]}
Columns 363 through 369
{[9.4855e+03]} {[9.5117e+03]} {[9.5379e+03]} {[9.5641e+03]} {[9.5903e+03]} {[9.6165e+03]} {[9.6427e+03]}
Columns 370 through 376
{[9.6689e+03]} {[9.6951e+03]} {[9.7213e+03]} {[9.7475e+03]} {[9.7737e+03]} {[9.7999e+03]} {[9.8261e+03]}
Columns 377 through 383
{[9.8523e+03]} {[9.8785e+03]} {[9.9047e+03]} {[9.9309e+03]} {[9.9571e+03]} {[9.9833e+03]} {[1.0010e+04]}
Columns 384 through 390
{[1.0036e+04]} {[1.0062e+04]} {[1.0088e+04]} {[1.0114e+04]} {[1.0141e+04]} {[1.0167e+04]} {[1.0193e+04]}
Columns 391 through 397
{[1.0219e+04]} {[1.0245e+04]} {[1.0272e+04]} {[1.0298e+04]} {[1.0324e+04]} {[1.0350e+04]} {[1.0376e+04]}
Columns 398 through 404
{[1.0403e+04]} {[1.0429e+04]} {[1.0455e+04]} {[1.0481e+04]} {[1.0507e+04]} {[1.0534e+04]} {[1.0560e+04]}
Columns 405 through 411
{[1.0586e+04]} {[1.0612e+04]} {[1.0638e+04]} {[1.0665e+04]} {[1.0691e+04]} {[1.0717e+04]} {[1.0743e+04]}
Columns 412 through 418
{[1.0769e+04]} {[1.0796e+04]} {[1.0822e+04]} {[1.0848e+04]} {[1.0874e+04]} {[1.0900e+04]} {[1.0927e+04]}
Columns 419 through 425
{[1.0953e+04]} {[1.0979e+04]} {[1.1005e+04]} {[1.1031e+04]} {[1.1058e+04]} {[1.1084e+04]} {[1.1110e+04]}
Columns 426 through 432
{[1.1136e+04]} {[1.1162e+04]} {[1.1189e+04]} {[1.1215e+04]} {[1.1241e+04]} {[1.1267e+04]} {[1.1293e+04]}
Columns 433 through 439
{[1.1320e+04]} {[1.1346e+04]} {[1.1372e+04]} {[1.1398e+04]} {[1.1424e+04]} {[1.1451e+04]} {[1.1477e+04]}
Columns 440 through 446
{[1.1503e+04]} {[1.1529e+04]} {[1.1556e+04]} {[1.1582e+04]} {[1.1608e+04]} {[1.1634e+04]} {[1.1660e+04]}
Columns 447 through 453
{[1.1687e+04]} {[1.1713e+04]} {[1.1739e+04]} {[1.1765e+04]} {[1.1791e+04]} {[1.1818e+04]} {[1.1844e+04]}
Columns 454 through 460
{[1.1870e+04]} {[1.1896e+04]} {[1.1922e+04]} {[1.1949e+04]} {[1.1975e+04]} {[1.2001e+04]} {[1.2027e+04]}
Columns 461 through 467
{[1.2053e+04]} {[1.2080e+04]} {[1.2106e+04]} {[1.2132e+04]} {[1.2158e+04]} {[1.2184e+04]} {[1.2211e+04]}
Columns 468 through 474
{[1.2237e+04]} {[1.2263e+04]} {[1.2289e+04]} {[1.2315e+04]} {[1.2342e+04]} {[1.2368e+04]} {[1.2394e+04]}
Columns 475 through 481
{[1.2420e+04]} {[1.2446e+04]} {[1.2473e+04]} {[1.2499e+04]} {[1.2525e+04]} {[1.2551e+04]} {[1.2577e+04]}
Columns 482 through 488
{[1.2604e+04]} {[1.2630e+04]} {[1.2656e+04]} {[1.2682e+04]} {[1.2708e+04]} {[1.2735e+04]} {[1.2761e+04]}
Columns 489 through 495
{[1.2787e+04]} {[1.2813e+04]} {[1.2839e+04]} {[1.2866e+04]} {[1.2892e+04]} {[1.2918e+04]} {[1.2944e+04]}
Columns 496 through 500
{[1.2970e+04]} {[1.2997e+04]} {[1.3023e+04]} {[1.3049e+04]} {[1.3075e+04]}
and I want to delete all cells up to for example "183.4207", how can I delete them all at once?
##### 4 comentariosMostrar 2 comentarios más antiguosOcultar 2 comentarios más antiguos
Dyuman Joshi el 1 de Feb. de 2024
Movida: Dyuman Joshi el 1 de Feb. de 2024
First, concatenate the data to get it in a numeric array. See - horzcat
As you are dealing with floating point numbers, compare using a tolerance and find the index of the value.
Delete the portion upto the index obtained.
gravy el 1 de Feb. de 2024
Movida: Dyuman Joshi el 1 de Feb. de 2024
I've already found the solution, thank you.

Iniciar sesión para comentar.

### Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

R2023b

### Community Treasure Hunt

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

Start Hunting!

Translated by