i need to know how to select values from a 2x365 array
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Raul Castillo
am 2 Okt. 2019
Beantwortet: Walter Roberson
am 2 Okt. 2019
hey i have a 2x365 array and i know that if you use column_1= data (1:365) to select the data in the first column but how would i input it to get all of the data for the secound column
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Okt. 2019
No, if you have a 2 x 365 array, then column_1 = data(1:365) would get you the first 182 full columns and the first row of the 183'rd column as well. To get the first column you would use data(:,1) which will get you a 2 x 1 vector. The second column would be data(:,2) which would get you a 2 x 1 vector.
I suspect you are looking for rows rather than columns. row_1 = data(1,:); row_2 = data(2,:); and each of those would be 1 x 365.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays 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!