OriginPro 2022b (64-bit) SR1 9.9.5.171 (Academic) Windows 10
I have a set of x (time) coordinates in a column that marks the timing of a repeating event. I need to calculate the frequency of these events and the standard deviation of the frequency. I know for this data the frequency would be the inverse of the slope. My issue is I have no idea how to code this into origin in a way that can be scripted to run across a full sheet of data where each column is a separate set of events. Alternatively, there may be an app or x function that can do this that I still haven't located.
You can run a linear fit on the data (x: time values, y: the event indices). The fitting tool is in the menu Analysis->Fitting->Linear Fit. See the attached project file where the slope (frequency) and standard error is highlighted. Thank you. https://my.originlab.com/ftp/forum_and_kbase/Images/frequency.opju
Seems you need to find the mean value of time interval between the events which is reciprocal to frequency. Knowing mean and sd values for time interval you can easily obtain corresponding values for frequency.
This is the same line of thought I was going down however as this is an intermediate step and these values will be further processed I need to get the output onto its own sheet, not in a report sheet. In other words, I need the formula below added into col(A) row [1] and then have it copied col(B:end) so that the source of the (x,y) data updates automatically. I then also want to calculate the Standard deviation of the regression in the exact same way on another sheet. I've included a project file as an example where Center Max and Peak Index act as the (x,y) inputs as well as the script I put together for creating the Frequency page (minus the slope formula). We are dealing with thousands of these data sets so scripting this out will save us huge amounts of time and lower the risk of user error. Thanks in advance for any help you can offer with this!