I need to keep only specific columns from the .csv table

21 views (last 30 days)
Hi
I need to read a row from .csv table and delete all the column from where the value was taken if this value < 175.
In other words, every column in my file is satellite and I need to keep only the columns(satellites) with orbital position > 175
It shouhd be less then 10 columns.
This is my code that deletes all the table and keeps only the first column
tb = readtable('satellites-16-Jan-2024.csv', VariableNamingRule="preserve");
z = table2array(round(tb(1,2:end)));
for i=1:length(z)
if z(i) < 175
tb(:,i+1:end) = [];
end
end
And this is the file
  1 Comment
Dl
Dl on 16 Jan 2024
In the end the table with sorted columns should be also written as a .csv table like the read one

Sign in to comment.

Accepted Answer

Dyuman Joshi
Dyuman Joshi on 16 Jan 2024
Moved: Dyuman Joshi on 16 Jan 2024
%Read the data
tb = readtable('satellites-16-Jan-2024.csv', VariableNamingRule="preserve")
tb = 20×566 table
Name TDRS 3 FLTSATCOM 8 (USA 46) SKYNET 4C TDRS 5 TDRS 6 UFO 2 (USA 95) USA 99 (MILSTAR-1 1) UFO 4 (USA 108) AMSC 1 TDRS 7 USA 115 (MILSTAR-1 2) INMARSAT 3-F1 INMARSAT 3-F2 INMARSAT 3-F3 GALAXY 25 (G-25) INTELSAT 5 (IS-5) AMC-3 (GE-3) USA 134 INMARSAT 3-F5 ASTRA 2A SKYNET 4E ABS-6 UFO 10 (USA 146) GALAXY 11 (G-11) USA 148 ASIASTAR USA 149 (DSP 20) TDRS 8 INTELSAT 9 (IS-9) NSS-11 (AAP-1) USA 153 AMC-6 (GE-6) INTELSAT 1R (IS-1R) ANIK F1 USA 157 (MILSTAR-2 2) INTELSAT 10 (IS-10) INTELSAT 901 (IS-901) ASTRA 2C USA 159 (DSP 21) INTELSAT 902 (IS-902) USA 164 (MILSTAR-2 3) INTELSAT 904 (IS-904) NSS-7 DIRECTV 5 (TEMPO 1) INTELSAT 905 (IS-905) GALAXY 3C (G-3C) INTELSAT 906 (IS-906) TDRS 10 NIMIQ 2 USA 167 USA 169 (MILSTAR-2 4) ASIASAT 4 HELLAS-SAT 2 THURAYA-2 OPTUS C1 GALAXY 23 (G-23) USA 170 GALAXY 13 (HORIZONS-1) YAMAL 202 UFO 11 (USA 174) USA 176 (DSP 22) ABS-4 (MOBISAT-1) EUTELSAT 7A AMC-11 (GE-11) INTELSAT 10-02 ANIK F2 AMC-15 NSS-10 (AMC-12) XTAR-EUR XM-3 (RHYTHM) INMARSAT 4-F1 DIRECTV 8 GALAXY 28 (G-28) THAICOM 4 GALAXY 14 (G-14) ANIK F1R SYRACUSE 3A INMARSAT 4-F2 SPACEWAY 2 METEOSAT-9 (MSG-2) EUTELSAT 174A ECHOSTAR 10 SPAINSAT EUTELSAT HOTBIRD 13E JCSAT-5A ASTRA 1KR EWS-G1 (GOES 13) EUTELSAT 113 WEST A GALAXY 16 (G-16) EUTELSAT HOTBIRD 13B JCSAT-3A SYRACUSE 3B KOREASAT 5 (MUGUNGWHA 5) DIRECTV 9S OPTUS D1 BADR-4 WILDBLUE-1 SKYNET 5A ANIK F3 ASTRA 1L GALAXY 17 (G-17) ZHONGXING-6B DIRECTV 10 SPACEWAY 3 BSAT-3A OPTUS D2 INTELSAT 11 (IS-11) WGS F1 (USA 195) SKYNET 5B ASTRA 4A (SIRIUS 4) HORIZONS-2 THURAYA-3 THOR 5 AMC-14 DIRECTV 11 ICO G1 VINASAT-1 STAR ONE C2 AMOS-3 GALAXY 18 (G-18) CHINASAT 9 (ZX 9) SKYNET 5C TURKSAT 3A INTELSAT 25 (IS-25) BADR-6 ECHOSTAR 11 SUPERBIRD-C2 AMC-21 INMARSAT 4-F3 NIMIQ 4 GALAXY 19 (G-19) ASTRA 1M CIEL-2 EUTELSAT HOTBIRD 13C FENGYUN 2E EXPRESS-AM44 NSS-9 EUTELSAT 33E TELSTAR 11N WGS F2 (USA 204) SES-7 (PROTOSTAR 2) MEASAT-3A GOES 14 FM-5 TERRESTAR-1 ASIASAT 5 JCSAT-12 (JCSAT-RA) OPTUS D3 NIMIQ 5 AMAZONAS 2 COMSATBW-1 NSS-12 THOR 6 INTELSAT 14 (IS-14) EUTELSAT 36B INTELSAT 15 (IS-15) WGS F3 (USA 211) DIRECTV 12 BEIDOU-2 G1 RADUGA-1M 2 SDO INTELSAT 16 (IS-16) EWS-G2 (GOES 15) ECHOSTAR 14 SES-1 ASTRA 3B COMSATBW-2 BEIDOU-2 G3 BADR-5 COMS 1 ARABSAT-5A ECHOSTAR 15 BEIDOU-2 IGSO-1 NILESAT 201 RASCOM-QAF 1R AEHF-1 (USA 214) XM-5 BSAT-3B BEIDOU-2 G4 SKYTERRA 1 HYLAS 1 INTELSAT 17 (IS-17) BEIDOU-2 IGSO-2 EUTELSAT KA-SAT 9A HISPASAT 30W-5 KOREASAT 6 BEIDOU-2 IGSO-3 INTELSAT NEW DAWN YAHSAT 1A SBIRS GEO-1 (USA 230) TELSTAR 14R GSAT-8 ST-2 CHINASAT 10 (ZX 10) TIANLIAN 1-02 SES-3 KAZSAT-2 BEIDOU-2 IGSO-4 ASTRA 1N BSAT-3C (JCSAT-110R) PAKSAT-1R SES-2 ARABSAT-5C EUTELSAT 7 WEST A QUETZSAT 1 INTELSAT 18 (IS-18) EUTELSAT 16A VIASAT-1 ASIASAT 7 BEIDOU-2 IGSO-5 LUCH-5A NIGCOMSAT 1R FENGYUN 2F WGS F4 (USA 233) SES-4 BEIDOU-2 G5 MUOS-1 INTELSAT 22 (IS-22) APSTAR 7 YAHSAT 1B AEHF-2 (USA 235) JCSAT-13 VINASAT-2 NIMIQ 6 CHINASAT 2A (ZX 2A) INTELSAT 19 (IS-19) ECHOSTAR 17 METEOSAT-10 (MSG-3) SES-5 TIANLIAN 1-03 INTELSAT 20 (IS-20) HYLAS 2 INTELSAT 21 (IS-21) ASTRA 2F GSAT-10 INTELSAT 23 (IS-23) BEIDOU-2 G6 LUCH-5B YAMAL 300K STAR ONE C3 EUTELSAT 21B ECHOSTAR 16 CHINASAT 12 (ZX 12) EUTELSAT 70B YAMAL 402 SKYNET 5D MEXSAT 3 TDRS 11 AMAZONAS 3 AZERSPACE 1 SBIRS GEO-2 (USA 241) EUTELSAT 117 WEST A ANIK G1 CHINASAT 11 (ZX 11) EUTELSAT 7B WGS F5 (USA 243) SES-6 IRNSS-1A MUOS-2 ALPHASAT INSAT-3D WGS F6 (USA 244) ES'HAIL 1 GSAT-7 AMOS-4 AEHF-3 (USA 246) ASTRA 2E FM-6 RADUGA-1M 3 SES-8 INMARSAT 5-F1 TKSAT-1 (TUPAC KATARI) EXPRESS-AM5 GSAT-14 THAICOM 6 TDRS 12 ABS-2 ATHENA-FIDUS TURKSAT 4A EXPRESS-AT1 EXPRESS-AT2 AMAZONAS 4A ASTRA 5B IRNSS-1B LUCH-5V KAZSAT-3 EUTELSAT 3B ASIASAT 8 (AMOS-7) ASIASAT 6 OPTUS 10 MEASAT-3B LUCH (OLYMP-K 1) HIMAWARI-8 IRNSS-1C INTELSAT 30 (IS-30) ARSAT 1 EXPRESS-AM6 GSAT-16 DIRECTV 14 YAMAL 401 ASTRA 2G FENGYUN 2G MUOS-3 INMARSAT 5-F2 ABS-3A EUTELSAT 115 WEST B EXPRESS-AM7 IRNSS-1D BEIDOU-3S IGSO-1S THOR 7 TURKMENALEM52E/MONACOSAT DIRECTV 15 SKY MEXICO-1 METEOSAT-11 (MSG-4) STAR ONE C4 WGS F7 (USA 263) INTELSAT 34 (IS-34) EUTELSAT 8 WEST B GSAT-6 INMARSAT 5-F3 MUOS-4 TJS-1 EXPRESS-AM8 BEIDOU-3S IGSO-2S SKY MUSTER 1 (NBN1A) ARSAT 2 MORELOS 3 APSTAR 9 TURKSAT 4B CHINASAT 2C (ZX 2C) GSAT-15 BADR-7 (ARABSAT-6B) LAOSAT 1 TELSTAR 12V ELEKTRO-L 2 COSMOS 2513 EXPRESS-AMU1 GAOFEN-4 BELINTERSAT-1 IRNSS-1E EUTELSAT 9B SES-9 EUTELSAT 65 WEST A IRNSS-1F BEIDOU-2 IGSO-6 IRNSS-1G JCSAT-2B THAICOM 8 INTELSAT 31 (IS-31) BEIDOU-2 G7 ABS-2A (MONGOLSAT-1) EUTELSAT 117 WEST B BRISAT ECHOSTAR 18 MUOS-5 TIANTONG-1 1 JCSAT-16 USA 270 USA 271 INTELSAT 36 (IS-36) INTELSAT 33E (IS-33E) INSAT-3DR GSAT-18 SKY MUSTER 2 (NBN1B) HIMAWARI-9 SHIJIAN-17 (SJ-17) GOES 16 TIANLIAN 1-04 WGS F8 (USA 272) FENGYUN 4A ECHOSTAR 19 JCSAT-110A (JCSAT-15) STAR ONE D1 TJS-2 SBIRS GEO-4 (USA 273) HISPASAT 36W-1 TELKOM 3S INTELSAT 32E (IS-32E) ECHOSTAR 23 WGS F9 (USA 275) SES-10 CHINASAT 16 (SJ-13) KOREASAT 7 SGDC GSAT-9 INMARSAT 5-F4 SES-15 QZS-2 (MICHIBIKI-2) VIASAT-2 EUTELSAT 172B GSAT-19 ECHOSTAR 21 BULGARIASAT-1 HELLAS-SAT 3 GSAT-17 INTELSAT 35E (IS-35E) COSMOS 2520 TDRS 13 QZS-3 (MICHIBIKI-3) AMAZONAS 5 ASIASAT 9 INTELSAT 37E (IS-37E) BSAT-4A QZS-4 (MICHIBIKI-4) SES-11 (ECHOSTAR 105) KOREASAT 5A ALCOMSAT 1 SBIRS GEO-3 (USA 282) AL YAH 3 SES-14 GOES 17 HISPASAT 30W-6 SUPERBIRD-B3 HYLAS 4 IRNSS-1I USA 283 COSMOS 2526 APSTAR 6C BANGABANDHUSAT-1 SES-12 FENGYUN 2H BEIDOU-2 IGSO-7 TELSTAR 19V TELKOM 4 (MERAH PUTIH) TELSTAR 18V (APSTAR 5C) AZERSPACE 2 (IS-38) HORIZONS-3E AEHF-4 (USA 288) BEIDOU-3 G1 GSAT-29 ES'HAIL 2 GEO-KOMPSAT-2A GSAT-11 GSAT-7A COSMOS 2533 TJS-3 CHINASAT 2D (ZX 2D) HELLAS-SAT 4 & SGS-1 GSAT-31 NUSANTARA SATU CHINASAT 6C (ZX 6C) WGS 10 (USA 291) TIANLIAN 2-01 ARABSAT-6A BEIDOU-3 IGSO-1 BEIDOU-2 G8 YAMAL 601 AT&T T-16 EUTELSAT 7C BEIDOU-3 IGSO-2 COSMOS 2539 EDRS-C INTELSAT 39 (IS-39) AMOS-17 AEHF-5 (USA 292) EUTELSAT 5 WEST B MEV-1 TJS-4 BEIDOU-3 IGSO-3 TIBA-1 INMARSAT GX5 JCSAT-18 (KACIFIC 1) ELEKTRO-L 3 SHIJIAN-20 (SJ-20) TJS-5 GSAT-30 EUTELSAT KONNECT JCSAT-17 GEO-KOMPSAT-2B BEIDOU-3 G2 AEHF-6 (USA 298) BEIDOU-3 G3 APSTAR 6D KOREASAT 116 EXPRESS 103 EXPRESS 80 BSAT-4B MEV-2 GALAXY 30 (G-30) GAOFEN-13 01 TIANTONG-1 2 LUCAS (JDRS-1) SXM-7 CMS-01 TURKSAT 5A TIANTONG-1 3 TJS-6 SBIRS GEO-5 (USA 315) FENGYUN 4B SXM-8 TIANLIAN 1-05 STAR ONE D2 EUTELSAT QUANTUM CHINASAT 2E (ZX 2E) TJS-7 CHINASAT 9B SHIJIAN-21 (SJ-21) SES-17 SYRACUSE 4A QZS-1R CHINASAT 1D (ZX 1D) STPSAT-6 LDPE-1 EXPRESS AMU-7 EXPRESS AMU-3 TIANLIAN 2-02 TURKSAT 5B INMARSAT 6-F1 SHIYAN 12 01 (SY-12 01) SHIYAN 12 02 (SY-12 02) TJS-9 USA 324 USA 325 GOES 18 CHINASAT 6D (ZX 6D) NILESAT 301 CMS-02 (GSAT 24) MEASAT 3D SES-22 WFOV (USA 332) TIANLIAN 2-03 SBIRS GEO-6 (USA 336) EUTELSAT KONNECT VHTS CHINASAT 1E (ZX 1E) SES-20 SES-21 GALAXY 33 (G-33) GALAXY 34 (G-34) ANGOSAT 2 EUTELSAT HOTBIRD 13F EUTELSAT HOTBIRD 13G CHINASAT 19 (ZX 19) GALAXY 31 (G-31) GALAXY 32 (G-32) EUTELSAT 10B GALAXY 35 (G-35) GALAXY 36 (G-36) METEOSAT-12 (MTG-I1) SHIJIAN-23 (SJ-23) USA 340 USA 342 LDPE-3A ELEKTRO-L 4 AMAZONAS NEXUS CHINASAT 26 (ZX 26) LUCH-5X (OLYMP-K 2) GAOFEN-13 02 SES-18 SES-19 INTELSAT 40E (IS-40E) VIASAT-3 ARCTURUS GS-1 BEIDOU-3 G4 ARABSAT-7B (BADR-8) IRNSS-1J (NVS-01) NUSANTARA TIGA (SATRIA) H2SAT (HEINRICH HERTZ) SYRACUSE 4B JUPITER 3 (ECHOSTAR 24) GALAXY 37 (G-37) LUDI TANCE-4 01A TJS-10 CHINASAT 6E (ZX 6E) YAOGAN-41 _________________________________________ _________ ____________________ _________ _______ _________ ______________ ____________________ _______________ ________ _________ _____________________ _____________ _____________ _____________ ________________ _________________ ____________ ________ _____________ ________ _________ _________ ________________ ________________ _______ _________ ________________ _______ _________________ ______________ _________ ____________ ___________________ ________ _____________________ ___________________ _____________________ _________ ________________ _____________________ _____________________ _____________________ _________ ___________________ _____________________ ________________ _____________________ _______ ________ _______ _____________________ _________ ____________ _________ ________ ________________ ________ ______________________ _________ ________________ ________________ _________________ ___________ ______________ ______________ ________ ________ _______________ ________ _____________ _____________ _________ ________________ _________ ________________ ________ ___________ _____________ __________ __________________ _____________ ___________ _________ ____________________ _________ _________ ________________ ___________________ ________________ ____________________ _________ ___________ ________________________ __________ ________ ________ __________ _________ _______ ________ ________________ ____________ __________ __________ _________ _________ ___________________ ________________ _________ ___________________ __________ _________ _______ _______ __________ _________ _________ ___________ ________ ________________ _________________ _________ __________ ___________________ ________ ___________ ____________ ______ _____________ _________ ________________ ________ _______ ____________________ __________ ____________ _______ ____________ ___________ ________________ ___________________ _________ ________ _________ ___________ _________ ___________________ _________ _________ __________ __________ _______ _______ ___________________ ____________ ___________________ ________________ __________ ___________ ___________ ________ ___________________ ________________ ___________ ________ ________ __________ ___________ ________ _________ __________ ___________ _______________ ___________ _____________ ________________ ________ _________ ___________ __________ _________ ___________________ _______________ __________________ ______________ __________ _______________ _________________ _________ _____________________ ___________ _______ _________ ___________________ _____________ ________ _________ _______________ ________ ____________________ _________ _________ __________ _________________ __________ ___________________ ____________ ________ _________ _______________ ________ ____________ __________ ________________ _________ ___________ _________ ___________________ ________ _________ ________________ _________ _________ _________ ___________________ ___________________ ___________ ___________________ _______ _____________ ___________________ ________ ___________________ ________ _________ ___________________ ___________ _________ __________ ___________ ____________ ___________ ___________________ ____________ _________ _________ ________ _______ __________ ___________ _____________________ ___________________ _______ ___________________ ___________ ________________ _________ ________ _______ ________ _________ ________________ _________ ________ ______ ________________ ________ ________ ___________ _________ _____________ ______________________ ___________ ________ _________ _________ ________ ____________ __________ ___________ ___________ ___________ ________ ________ _________ ________ ___________ __________________ _________ _________ _________ ________________ __________ _________ ___________________ _________ ___________ _______ __________ _________ ________ __________ _________ _____________ ________ ___________________ ___________ _________ _________________ _______ ________________________ __________ ____________ ___________________ ___________ ________________ ___________________ _________________ _________ _____________ ________ _________ ___________ _________________ ____________________ _________ _________ _________ __________ ___________________ _________ ___________________ _________ ___________ ___________ ___________ ____________ _________ _____________ _________ ___________ _________ __________________ ________ _______________ _________ _________ _________ ___________________ ___________ ____________________ ___________________ _________ ___________ __________ ____________ _________ _________ _______ ___________________ _____________________ _________ ________ ____________________ __________ __________________ _________ _____________ ________________ __________ ___________ _____________________ ___________ ______ _____________________ ______________ _________ _____________________ ___________ ________________ _________ ___________________ __________ _________ _________ _____________ _______ ___________________ _________ _____________ ________ ___________ _____________ ____________ _________ _____________________ ___________ ________ ___________________ __________ _________ _____________________ _________ ___________________ _____________________ ___________ __________ _____________________ _________ _________ ________ ______________ ____________ ________ ________ _________ ___________ _________ ________________ _________ __________ _______________ ___________ ______________________ _______________________ ___________________ ___________ ________________ ___________ _______ _________ ______________ ________ _______ ___________ ______ ___________________ ____________________ ________ ______________ ___________________ ________________ _____________ __________ _______________ ___________ _________ _________ ___________ _______________ ___________ ________ ___________________ ________ ________________ _________________ _________ _________ _______________ ________ ____________ ____________________ ___________ __________________ _________ _________ ________________ _________ ______________ ___________ ________________ ___________ _________ ____________ ___________ __________ _________ ______ ________________ ____________ ____________ ______________ _________ _________ __________ ____________ _______ _____________________ __________ _________ _____________ ___________ ________________ ___________________ _________ ___________ __________________ _________ ___________ __________ ___________________ ________ ________ _____________ _____________ _____________ __________ _____________ _______________________ _______________________ _________ _________ ________ ________ ___________________ ___________ ________________ _________ _______ ______________ _____________ _____________________ _____________________ ___________________ ________ _______ ________________ ________________ _________ ____________________ ____________________ ___________________ ________________ ________________ ____________ ________________ ________________ ____________________ __________________ _________ ________ _________ ___________ ______________ ___________________ ___________________ ____________ ________ _______ _____________________ _________ ________ ________ ___________ ___________________ _________________ _______________________ ______________________ ___________ _______________________ ________________ ________________ ______ ___________________ _________ {'Orbital Position' } -49.994 124.75 32.337 -168.32 -46.93 27.61 -91.06 171.15 -108.59 83.503 -121.1 81.459 -36.706 -151.08 70.01 165.05 -73.099 -113.18 -55.104 56.088 -2.2893 157.91 -24.049 165.21 179.08 103.91 -165.89 -168.85 -51.082 174.89 133.28 -140.1 156.02 -110.31 -125.36 176.71 -28.586 -73.566 -50.129 -51.183 17.805 -30.601 -21.097 -111.22 -25.586 -95.941 63.049 -172.2 -110.29 -131.18 151.05 146.47 -11.12 42.91 154.61 -121.98 13.305 -151.13 162.38 74.148 86.17 59.871 -140.3 -112.2 -2.104 -112.22 -106.15 -38.553 27.882 -86.19 175.51 -120.14 -90.109 118.43 31.8 -108.41 45.105 142.37 -139.97 44.579 172.89 -111.27 -31.085 11.713 130.94 18.116 137.13 -114.09 -100.11 31.975 126.91 -6.3031 111.99 -102.31 150.92 24.902 -112.28 94.087 -119.78 18.091 -86.099 114.4 -103.88 -57.846 108.74 158.91 -44.103 4.8864 23.974 3.7108 -74.907 97.407 -1.8516 16.411 -100.27 -93.938 130.85 -66.103 -5.2084 -124.1 91.103 -18.895 40.881 -32.594 24.88 -111.08 142.85 -126 -99.097 -83.083 -98.108 18.096 -129.95 -13.607 85.583 -12.105 -178.04 -52.725 -38.626 56.424 107.15 90.408 -109.66 -87.219 -112.09 99.423 130.98 154.91 -73.772 -62.109 61.907 55.896 -1.9438 -46.092 34.8 84.053 -43.92 -103.83 139.31 83.875 -103.42 -77.302 60.481 -119.97 -102.09 22.431 12.088 78.441 24.895 127.06 29.385 -62.73 107.61 -8.0519 1.8098 2.9028 -116.28 108.75 158.98 -102.38 155.33 64.903 103.73 7.8845 -31.08 114.91 104.57 31.73 51.39 64.606 -64.095 53.987 86.927 109.43 -172.2 -104.1 85.382 92.563 18.108 108.85 36.807 -88.087 18.887 -8.4135 -78.089 178.92 14.896 -116.2 104.4 93.267 165.76 41.424 111.09 87.293 -23.091 57.627 -101.1 71.005 75.433 46.508 -95.272 122.91 130.74 -92.201 97.139 164.91 -108.2 -1.0609 3.8718 15.418 67.4 29.944 -59.121 27.114 81.939 -54.084 82.809 -17.406 -178.15 -76.08 20.512 -62.592 86.408 69.4 53.803 51.606 -115.91 -175.36 -62.043 44.892 -39.094 -117.9 -108.4 96.825 5.9064 -53.593 -41.609 53.914 -178.11 23.766 80.975 -136.3 24.41 72.893 63.919 -156.17 27.406 -117.25 33.9 93.903 61.514 -88.302 138.94 72.903 77.361 -41.946 73.825 36.697 40.905 54.911 138.74 -75.097 22.396 54.009 93.577 57.406 1.9916 -4.9734 118.81 154.89 90.415 -19.17 139.57 81.869 -96.163 -72.897 51.894 53.993 -100.33 88.862 27.102 98.729 -16.571 -56.119 -4.0615 -116.01 38.885 110.7 94.274 -1.7515 50.915 -103.95 -79.836 8.2939 -71.1 173.93 -56.576 -9.1112 81.446 178.52 73.935 153.9 -15.095 91.776 139.16 -82.092 -114.2 140.91 48.873 102.35 92.377 24.918 127.43 -16.083 -15.547 79.149 34.997 104.61 50.403 110.75 7.8896 107.2 -66.308 31.413 92.381 128.32 152.89 77.427 -96.15 109.46 73.614 -118.09 149.42 -62.459 -106.05 100.31 142.84 90.239 12.763 67.394 58.889 72.904 72.903 143.71 139.67 166.12 -76.305 175.76 148.72 103.45 -98.191 108.97 -85.096 65.388 -97.895 -37.096 116.91 -44.273 -111 -13.079 -67.981 109.44 114.81 -75.937 96.224 55.414 -130.25 140.66 -71.016 170.9 46.758 9.1723 0.80253 37.879 92.412 -35.613 43.92 -12.633 125.95 -62.103 121.01 -19.08 108.74 135.48 -106.05 112.07 -25.878 -160.49 -21.203 -48.585 -105.77 -31.08 160.89 -34.597 53.944 132.99 126.98 132.9 117.99 93.905 78.316 107.66 -64.104 106.89 136.91 43.997 167.93 -68.688 138.89 53.968 24.688 127.15 72.908 61.693 68.925 171.87 128.91 37.899 46.776 144.9 129.33 59.211 75.942 29.398 115.36 143.43 47.897 -101.93 5.8793 117.41 10.914 30.084 60.866 15.913 53.565 -6.1008 -28.588 82.499 116.05 34.395 9.8796 148.9 74.906 49.128 106.42 81.913 6.1021 134.91 127.17 78.946 136.59 109.49 132.91 115.11 95.422 78.896 108.74 -2.103 -126.09 116.72 123.89 89.698 -86.327 81.902 29.806 80.454 177.34 19.816 131.82 -86.315 15.647 -71.171 46.6 96.887 -100.58 100.33 94.444 -68.197 44.419 130.48 129.08 -112.73 -150.5 143.85 101.9 169.89 40.906 82.705 19.473 137.19 136.08 134.68 153.04 -138.1 123.86 -8.1127 81.929 90.408 -136.08 118.2 9.5044 137.92 1.5792 80.308 -104.21 -132.01 -134.11 -130.02 21.924 11.907 11.895 162.27 -122.08 -92.095 8.8978 -94.179 -90.065 -4.6532 145.45 -74.668 23.036 122.97 164.66 -62.117 124.07 1.5685 145.56 -104.19 -136 -92.073 -90.008 -164.11 164.53 159.01 24.895 128.49 144.9 -0.59918 -7.5388 -96.295 -128.1 88.529 172.22 114.4 122.05 {'Catalog Num' } 19548 20253 20776 21639 22314 22787 22988 23467 23553 23613 23712 23839 24307 24674 24812 24916 24936 25019 25153 25462 25639 25924 25967 26038 26052 26107 26356 26388 26451 26554 26575 26580 26608 26624 26715 26766 26824 26853 26880 26900 27168 27380 27414 27426 27438 27445 27513 27566 27632 27691 27711 27718 27811 27825 27831 27854 27875 27954 28089 28117 28158 28184 28187 28252 28358 28378 28446 28526 28542 28626 28628 28659 28702 28786 28790 28868 28885 28899 28903 28912 28924 28935 28945 28946 29045 29055 29155 29162 29236 29270 29272 29273 29349 29494 29495 29526 29643 30794 31102 31306 31307 31800 31862 32018 32019 32252 32253 32258 32294 32299 32388 32404 32487 32708 32729 32763 32767 32768 32794 32951 33051 33055 33056 33153 33154 33207 33274 33275 33278 33373 33376 33436 33453 33459 33463 33595 33749 33750 34111 34713 34941 35362 35491 35493 35496 35696 35755 35756 35873 35942 35943 36032 36033 36097 36101 36106 36108 36131 36287 36358 36395 36397 36411 36499 36516 36581 36582 36590 36592 36744 36745 36792 36828 36830 36831 36868 37185 37207 37210 37218 37237 37238 37256 37258 37264 37265 37384 37392 37393 37481 37602 37605 37606 37677 37737 37748 37749 37763 37775 37776 37779 37809 37810 37816 37826 37834 37836 37843 37933 37948 37951 38014 38049 38070 38087 38091 38093 38098 38107 38245 38254 38331 38332 38342 38352 38356 38551 38552 38652 38730 38740 38741 38749 38778 38779 38867 38953 38977 38978 38991 38992 39008 39017 39020 39022 39034 39035 39070 39078 39079 39120 39122 39127 39157 39163 39168 39172 39199 39206 39215 39216 39222 39233 39234 39237 39256 39285 39360 39375 39460 39476 39481 39487 39498 39500 39504 39508 39509 39522 39612 39613 39616 39617 39635 39727 39728 39773 40107 40141 40146 40147 40258 40267 40269 40271 40272 40277 40332 40333 40345 40364 40367 40374 40384 40424 40425 40505 40547 40549 40613 40617 40663 40664 40732 40733 40746 40874 40875 40880 40882 40887 40892 40895 40938 40940 40941 40946 40982 40984 41021 41028 41029 41034 41036 41105 41121 41191 41194 41238 41241 41310 41380 41382 41384 41434 41469 41471 41552 41581 41586 41588 41589 41591 41592 41622 41725 41729 41744 41745 41747 41748 41752 41793 41794 41836 41838 41866 41869 41879 41882 41893 41903 41904 41911 41937 41942 41944 41945 42070 42075 42432 42662 42691 42692 42695 42698 42709 42738 42740 42741 42747 42749 42801 42814 42815 42818 42907 42915 42917 42934 42942 42950 42951 42965 42967 42984 43039 43162 43174 43175 43226 43228 43271 43272 43286 43339 43432 43450 43463 43488 43491 43539 43562 43587 43611 43632 43633 43651 43683 43698 43700 43823 43824 43864 43867 43874 43920 44034 44035 44048 44067 44071 44076 44186 44204 44231 44307 44333 44334 44337 44457 44475 44476 44479 44481 44624 44625 44637 44709 44800 44801 44868 44903 44910 44978 45026 45027 45245 45246 45344 45465 45807 45863 45920 45985 45986 46112 46113 46114 46610 46916 47202 47240 47256 47306 47321 47613 48618 48808 48838 49011 49055 49056 49062 49115 49125 49330 49332 49333 49336 49505 49817 49818 50001 50002 50005 50212 50319 50321 50322 50574 51280 51281 51850 52255 52817 52903 52904 52933 52940 53100 53355 53765 53813 53960 53961 54026 54027 54033 54048 54225 54230 54243 54244 54259 54741 54742 54743 55131 55138 55263 55264 55506 55508 55686 55841 55912 55970 55971 56174 56370 56371 56372 56564 56757 56759 57045 57213 57214 57479 57493 57624 58204 58253 58582 {'Classification' } NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN {'Launch Year' } 88 89 90 91 93 93 94 95 95 95 95 96 96 96 97 97 97 97 98 98 99 99 99 99 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 23 22 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23
%Compare the values from 2nd column onwards for deletion
%false for the 1st column to retain it
idx = [false round(tb{1,2:end})<175];
%Delete the columns as per the condition
tb(:,idx)=[]
tb = 20×9 table
Name USA 148 NSS-11 (AAP-1) INTELSAT 10 (IS-10) INMARSAT 4-F1 INTELSAT 18 (IS-18) INMARSAT 5-F3 TIANLIAN 1-04 TJS-6 _________________________________________ _______ ______________ ___________________ _____________ ___________________ _____________ _____________ _______ {'Orbital Position' } 179.08 174.89 176.71 175.51 178.92 178.52 175.76 177.34 {'Catalog Num' } 26052 26554 26766 28628 37834 40882 41869 47613 {'Classification' } NaN NaN NaN NaN NaN NaN NaN NaN {'Launch Year' } 0 0 1 5 11 15 16 21 {'Launch # of the year' } 1 59 19 9 56 42 72 10 {'Piece of the Launch' } NaN NaN NaN NaN NaN NaN NaN NaN {'Epoch Year' } 24 24 24 24 24 24 24 24 {'Epoch' } 15.841 15.841 15.841 15.912 15.841 15.698 15.841 16.128 {'First Derivative of Mean Motion' } 3.7e-07 2.8e-07 3.3e-07 6.1e-07 5.6e-07 5.4e-07 3.5e-07 4.6e-07 {'Second Derivative of Mean Motion' } 0 0 0 0 0 0 0 0 {'Drag Term' } 0 0 0 0 0 0 0 0 {'Ephemeris Type' } 0 0 0 0 0 0 0 0 {'Element Set Number' } 999 999 999 999 999 999 999 999 {'Inclination' } 10.461 0.0395 6.9555 4.1146 0.0197 0.019 0.0593 0.0319 {'Right Ascension of the Ascending Node'} 38.775 291.75 68.147 40.152 54.822 55.654 91.888 333.76 {'Eccentricity' } 3202 2393 4453 1244 2160 329 24718 872
As expected, after the deletion, the table has less than 10 columns.
  4 Comments
Dl
Dl on 16 Jan 2024
No, it doesn't 😅
If this 75 will be a variable
num1 = input()
and will be equal -7 for example, so code makes very strange thing
But if num1 = -5 it works normally
Dl
Dl on 16 Jan 2024
My bad🤦‍♂️
There is just no orbital position that equals -7...

Sign in to comment.

More Answers (1)

Hassaan
Hassaan on 16 Jan 2024
  1. Read the CSV file.
  2. Select the row you want to use as your reference row.
  3. Identify the columns where the values in the reference row are less than 175.
  4. Delete those columns.
  5. Save the modified table back to a CSV file.
% Read the CSV file
tb = readtable('satellites-16-Jan-2024.csv', 'VariableNamingRule', 'preserve');
% Select the reference row (e.g., row 1)
reference_row = tb(1, :);
% Identify columns with values less than 175
columns_to_delete = find(reference_row{1, 2:end} < 175) + 1; % +1 to account for the first column
% Delete the identified columns
tb(:, columns_to_delete) = [];
% Save the modified table back to a CSV file
writetable(tb, 'modified_satellites.csv');
This code reads the CSV file, selects the reference row (in this case, row 1), identifies columns with values less than 175, deletes those columns, and then saves the modified table to a new CSV file called 'modified_satellites.csv'.
------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.
  4 Comments
Hassaan
Hassaan on 16 Jan 2024
@Dl The code you provided has a small mistake. Instead of using ~= (not equal to) in the find function, you should use == (equal to) to correctly identify the columns with an orbital position of 175. Here's the corrected code:
reference_row = round(tb(1,2:end));
columns_to_delete = find(reference_row{1, 2:end} ~= 175) + 1;
tb(:, columns_to_delete) = [];
writetable(tb, 'modified_satellites.csv');
Also see @Aquatris comment. A nice observation.

Sign in to comment.

Categories

Find more on MATLAB Report Generator in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!