I created a Matlab script that creates a histogram variable "Counts" depending on which path and measurement I want to analyze from corresponding MonteCarlo datasets. "Counts" contains the bin values (specified by the script and stored in either the default "__HistIndep" or whatever the user specifies) and number of samples from the MonteCarlo dataset. I then created a snapshot of the equation variables as a dataset, so that I can save data from that specific path and measurement (such as CGAIN) and can graph/tabulate the data for analyzing later. When I change the path or measurement and run the script again, "Counts" has a new bin values and new sample distribution. When I look at the dataset that was created through snapshot, the variable "Counts" has changed the bin values, but maintains the sample distribution. When I graph the histogram variable from the snapshotted dataset, the bin values are according to the most recent run, not the value from which it was snapshot. So, the sample distribution in "Counts" are allocated into the wrong bins. Is this intended or is there a way to go around this without creating new histogram variables for each measurement/path?
To clarify, I want to create snapshots of a histogram variable to view and graph later as I adjust the variable for different measurements or paths, creating snapshots for each measurement and path along the way.