Storing first 200 points from 400 points
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hussam Ibrahim
am 13 Nov. 2017
Bearbeitet: James Tursa
am 14 Nov. 2017
Hello,
I have a 700000x1 double array where I want to store the first 200 points from every 400 points into a new array. How can I do it?
e.g. Store 1 to 200 from 1 to 400 Store 401 to 600 from 401 to 800 Store 801 to 1000 from 801 to 1200 and so on
0 Kommentare
Akzeptierte Antwort
James Tursa
am 14 Nov. 2017
Bearbeitet: James Tursa
am 14 Nov. 2017
X = your vector
temp = reshape(X,400,[]); % Get groups of 400 in columns
result = reshape(temp(1:200,:),1,[]); % Pick off the first 200 rows and reshape
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices 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!