Loop for plot vectors

2 Ansichten (letzte 30 Tage)
abdullah al-dulaimi
abdullah al-dulaimi am 6 Dez. 2022
Beantwortet: Jan am 6 Dez. 2022
I have this Data below, I want to plot column number 4 with 5 For each 10 raws, i try to use loop for this issue to plot all data automatically.
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
20 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
30 10 80 945 89.3860526900000
  4 Kommentare
Torsten
Torsten am 6 Dez. 2022
plot(A(1:10:end,4),A(1:10:end,5))
where A is your matrix.
abdullah al-dulaimi
abdullah al-dulaimi am 6 Dez. 2022
brother i want to plot one curve that have line (plot) of first 10 rows and second 10 rows ..... end

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jan
Jan am 6 Dez. 2022
A = [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
20 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
30 10 80 945 89.3860526900000];
axes('NextPlot', 'add');
for k = 1:10:size(A, 1)
plot(A(k:k+9, 4), A(k:k+9, 5));
end

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by