I have multiple data sets. For each data set, I would like to perform multiple calculations and have the results of those calculations be entries in a structure. For instance, say I have three data sets for which I'd like to calculate the maximum and minimum values and create entries in a fields in a structure for each maximum and minimum. I'm currently doing these calculations for each data set separately without a for loop, and my code is repetitive. I think I should be able to do this, but I haven't been able to figure out how. I think my code should look something like this:
data = [data1 data2 data3]
s.data(j)_max = max(data(j))
s.data(j)_min = min(data(j))
I don't know how to create the fields - s.data(j)_max and s.data(j)_min - of the the structure s using the entires in the array data. Can someone please help me?