Choosing a specific data from a structure
Mostra commenti meno recenti
Hello,
I'm trying to access a structure data by using this code :
File = fullfile(Path, sprintf('%s.mat',Name));
FileData = load(File, Name2);
Alpha = FileData.Name2.Vectors;
Where Path is the path where the structure is stored; Name is the name of the structure and Name2 is the name of one of the .mat file stored in the structure. All works fine util the loading process.
Now i want to choose a specific data stored in Name2.mat which is "Vectors". The problem is that "Name2" is an input of a function so "FileData.Name2.Vectors" won't works in a function. i want to know is there a way to fix this issue?
thank you for your help
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Structures in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!