How can I extract multiple rows from large data table in matlab that meet a certain condition to then be saved as new data table ? Note: the condition is extract an one row from each ten rows till end.
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hassanean
am 5 Dez. 2016
Kommentiert: Hassanean
am 6 Dez. 2016
I have table of data is consist of 1000 row and 10 columns. I need to extract a part of these data to be move to a new table. As well as, I need to extract the full data of one row from each 10 rows where extracting steps continues till last row in original table, in order to construct a new table.
5 Kommentare
Akzeptierte Antwort
Image Analyst
am 6 Dez. 2016
Try readtable(). Untested code:
fullTable = readtable(xlsFileName); % Make "table" variable.
% Construct vector of rows to extract
rowsToExtract = 1:10:size(fullTable, 1);
% Extract only those rows.
briefTable = fullTable(rowsToExtract, :);
Weitere Antworten (1)
KSSV
am 5 Dez. 2016
Use xlsread to read the data into matlab.
[num,txt,raw] = xlsread('your excel.xlsx');
num will be your 1000*10 data. You can pick any column and row from that.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Logical 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!