I have 16 plates of material, each of which is cut into 10 specimens. I collected the data from an Instron machine, and as such labeled each test folder as the material name followed by the plate number and then the specimen name followed by the specimen number I.E. Gold1_S1, Gold1_S2, Gold2_S3, etc.
I readtabled this entire 160 folder directory into my matlab as a 160ish row struct of many thousands of row cells, and I made sure that each test is named according to its folder name I gave it when setting up the test. I also sort_nat them so they are in order from Gold1_S1 to S10, and then Gold2_S1 to S10 and so on until Gold16_S10.
Problem is, some of the specimens were missing when I was testing them, so it means that I cannot use a nice simple for loop for processing each plate of data separately because some plates have only 7 specimens. Also, some of the specimens on the plates are different from the other specimens, so it further complicates things.
I am trying to group and process these specimens based on the name I gave them when I was testing them, but I can't figure out how to do it efficiently.
My best case scenario would be to base the calculations on the names of the plates and specimens. For instance if I could figure out how to tell which plate the specimen belong to it would be easy, as each data set is assigned to the name of the plate and specimen. I was thinking an if statement where if specimen belongs to plate 1, then take all those specimens and average their shear stress, and so on for each plate. I just cannot figure out how to make matlab read which plate the specimen belongs to.
TL;DR Have many plates which specimens are cut out of. Have data assigned to variables that are named according to plate and specimen. Want to automatically determine which plate and specimen the data comes from, and perform math based on that determination.
Thank you, and please be gentle,