How to split/segment csv file into multiple sections?
I have a file (called test_file.csv on my PC) that I want to split into several sections (I attached it as a .mat file here).
For this, I want to use the information in the second to last column "IsTransitioning". There are several instances where the cells in "IsTransitioning" equal "TRUE" in multiple consecutive rows. After those rows, there are multiple consecutive rows with "FALSE". I would like to save all the sections (the entire rows with all other columns) of consecutive rows with "FALSE" in a cell array where each cell contains the one section of consecutive rows.
Ideally, I wouldnt load the csv as a table and refer to the column numbers rather than the column names if that makes sense.
How could I do this if I dont know the number of times these sections occur?I have a file (called test_file.csv on my PC) that I want to split into several sections (I attached it as a .mat file here).
For this, I want to use the information in the second to last column "IsTransitioning". There are several instances where the cells in "IsTransitioning" equal "TRUE" in multiple consecutive rows. After those rows, there are multiple consecutive rows with "FALSE". I would like to save all the sections (the entire rows with all other columns) of consecutive rows with "FALSE" in a cell array where each cell contains the one section of consecutive rows.
Ideally, I wouldnt load the csv as a table and refer to the column numbers rather than the column names if that makes sense.
How could I do this if I dont know the number of times these sections occur? I have a file (called test_file.csv on my PC) that I want to split into several sections (I attached it as a .mat file here).
For this, I want to use the information in the second to last column "IsTransitioning". There are several instances where the cells in "IsTransitioning" equal "TRUE" in multiple consecutive rows. After those rows, there are multiple consecutive rows with "FALSE". I would like to save all the sections (the entire rows with all other columns) of consecutive rows with "FALSE" in a cell array where each cell contains the one section of consecutive rows.
Ideally, I wouldnt load the csv as a table and refer to the column numbers rather than the column names if that makes sense.
How could I do this if I dont know the number of times these sections occur? segment, section, split, save rows, split along rows MATLAB Answers — New Questions