Extracting Data in Excel With Groups into Matlab
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I have a data in excel. Each row has a level from 1 to 10. Level shows subgroups. For example level 2 rows are subgroups of level 1 row. It goes like this. Is there a way that i can transfer it to matlab? It could be some cell in cell or a struct or is there anything else?
Also if there is a funtion that recognise levels, it could be very helpful
Example data:
Mass Level
23 1
10 2
2 3
8 2
13 2
10 3
3 3
4 comentarios
Dyuman Joshi
el 8 de Ag. de 2023
What is your data? Attach the excel file via the paperclip button.
How exactly do you want to group them?
Respuestas (1)
Katy Weihrich
el 4 de Ag. de 2023
Matlab has a option that automatically generates a code for reading excel files.
Go to Home --> Import Data (under Variable) --> open the excle file you want to load in --> select options that you need --> click on Inport Selection --> Generate Script
Matlap will open a untiteled scriped with a code that loads the data as you wish.
Tips for the selection of option:
- You can select the format of the output under Output Type (in Improted data)
- You can change the format of the variable (e.g. change Number to Categorical) below the variable name.
- In Range deselect the first row with the variable names (e.g. A2:B8 instead of A1:B8)
- if you read text files (e.g. .cvs) you need to ensure that the correct delimiter is selected and if you used excle in Germany you need to change the decimal seperator (under delimiter options) to comma instead of periode.
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!