Plot 2 columns in matrix depend on another column

2 visualizzazioni (ultimi 30 giorni)
I have this data below, I want create loop to plot colum number 4 and 5 depend on column number 1, So the result for loop will be
Result rows = 20 10 80 805 82.1420812600000
25 10 80 895 85.8267390600000
30 10 80 805 84.4953351700000
40 10 80 945 89.3860526900000
Data=
20 10 80 805 82.1420812600000
20 10 80 815 82.5962426700000
20 10 80 825 83.0389831800000
20 10 80 835 83.4699908200000
20 10 80 845 83.8896382500000
20 10 80 855 84.2982532800000
20 10 80 865 84.6960746400000
20 10 80 875 85.0833919500000
20 10 80 885 85.4605315700000
25 10 80 895 85.8267390600000
20 10 80 905 86.1843723100000
20 10 80 915 86.5321793200000
20 10 80 925 86.8715343500000
20 10 80 935 87.2021683100000
20 10 80 945 87.5244455200000
30 10 80 805 84.4953351700000
30 10 80 815 84.9111542400000
30 10 80 825 85.3157596600000
30 10 80 835 85.7094764100000
30 10 80 845 86.0926231200000
30 10 80 855 86.4629108300000
30 10 80 865 86.8250898300000
30 10 80 875 87.1773925300000
30 10 80 885 87.5201869600000
30 10 80 895 87.8536800000000
30 10 80 905 88.1782819700000
30 10 80 915 88.4925349600000
30 10 80 925 88.7979872900000
30 10 80 935 89.0957112400000
40 10 80 945 89.3860526900000

Risposta accettata

Arif Hoq
Arif Hoq il 6 Dic 2022
Data=[
20 10 80 805 82.1420812600000
20 10 80 815 82.5962426700000
20 10 80 825 83.0389831800000
20 10 80 835 83.4699908200000
20 10 80 845 83.8896382500000
20 10 80 855 84.2982532800000
20 10 80 865 84.6960746400000
20 10 80 875 85.0833919500000
20 10 80 885 85.4605315700000
25 10 80 895 85.8267390600000
20 10 80 905 86.1843723100000
20 10 80 915 86.5321793200000
20 10 80 925 86.8715343500000
20 10 80 935 87.2021683100000
20 10 80 945 87.5244455200000
30 10 80 805 84.4953351700000
30 10 80 815 84.9111542400000
30 10 80 825 85.3157596600000
30 10 80 835 85.7094764100000
30 10 80 845 86.0926231200000
30 10 80 855 86.4629108300000
30 10 80 865 86.8250898300000
30 10 80 875 87.1773925300000
30 10 80 885 87.5201869600000
30 10 80 895 87.8536800000000
30 10 80 905 88.1782819700000
30 10 80 915 88.4925349600000
30 10 80 925 88.7979872900000
30 10 80 935 89.0957112400000
40 10 80 945 89.3860526900000];
[C ia ~]=unique(Data(:,1));
result_rows=Data(ia,:)
result_rows = 4×5
20.0000 10.0000 80.0000 805.0000 82.1421 25.0000 10.0000 80.0000 895.0000 85.8267 30.0000 10.0000 80.0000 805.0000 84.4953 40.0000 10.0000 80.0000 945.0000 89.3861

Più risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by