Hello , i have a data set with 10 columns.The first column contains the names of the variables and the 9 next contain the data for the variables across 9 periods. I want , for each period ,to take the data which are lower than the data's median .I use the following command for the first period: s1=data(data.mv1<median(data.mv1),{'Name','mv1',}), where mv1 is the header of the first period's column and s1 a new dataset which contains only the variables i want. My question is , can i write a (for) loop that will automatically do this for the whole 9 periods, thus giving me s1,s2,…,s9?
MATLAB: Creating a loop to use all columns in a dataset array
datasetStatistics and Machine Learning Toolbox
Related Question
- Putting certain blocks of numeric array data into its own cell each in a cell array. – tried num2cell and an index method to do this…
- How to return first 5 digits of 6th column in cell array
- I got error in the code “Powerflow Newton Raphson 2×2 matrix”. How to fixed it
- Convert CSV / Array Cell to Dataset
Best Answer