Working with Struct variable type in AppDesign.

I have a struct type of file which consist of 61 other struct files. In each of these 61 files there are multiple .mat data files with differnet type of variables(most of them are doubles). I want to design an app to brows in each these 61 file and extract the data I am looking for. any hint where to start?

5 Kommentare

It's hard to say what's the most appropriate solution since I did not understand where is your data located.
Is this how the .mat file looks like?
File1.mat
| - a (variable)
| - b (variable)
| - c (struct)
I would go with Tree component for the list of files and Table component for their contents. Issue with the Table(uitable) is that you won't be able to inspect the struct, nor arrays that have number of elements higher than 1, so you will have to create another table to display their contents.
This how my data source look like:
Mainfolder (struct)
| - file 1 (struct)
| - a (double)
| - b (double)
| - c (double)
| - file 2 (struct)
| - a (double)
| - b (double)
| - c (double)
| - file 3 (struct)
.
.
.
| - file 61 (struct)
I want to design an app to go through mainfiloder and be able to open another struct folder and then extract the double signals I am looking for.
Mario Malic
Mario Malic am 8 Dez. 2020
Then, first thing you need to do is to load all the files in the main folder, see dir, load.
main folder is already built.
Of course it is, I am not code this for you even though it's somewhat simple task, because if you need help with anything else afterwards, you'll have to ask again. So, as mentioned above, first part is the dir and load, to get the files and second one is playing with uitable to see the loaded data for each file.
Start with this to get the list of your mat files
S = dir('*.mat') % if files are in one folder
You can use the list to construct entries in your Tree component, then create a callback that would load file from selected node.
Lastly, display the loaded data in uitable

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Gefragt:

am 7 Dez. 2020

Kommentiert:

am 9 Dez. 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by