Reading data from textfile
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
moji
am 17 Jun. 2014
Bearbeitet: Geoff Hayes
am 17 Jun. 2014
I have one column of data with 600 rows and I want to know what does this statement do:
Column = data(1:11:end-10)
0 Kommentare
Akzeptierte Antwort
Geoff Hayes
am 17 Jun. 2014
Bearbeitet: Geoff Hayes
am 17 Jun. 2014
Create a 600x1 vector as follows
data = (1:1:600)';
which is just a column vector with values set as 1 2 3 4 5 6 ….600.
Now run the command
Column = data(1:11:end-10)
and observe the result. The data(1:11:end-10) extracts every eleventh row element (from data) starting at 1 and ending at the length of the array, given by end, less 10.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Standard File Formats finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!