Find Geiger counter CPM
Ältere Kommentare anzeigen
I am trying to find the counts per minute of a geiger counter signal using Simulink.
I managed to get the signal in a digital/binary form shown below:


I want to figure out how many pulses there are in a given timefram (1-3 seconds)
Antworten (1)
madhan ravi
am 14 Dez. 2023
Bearbeitet: madhan ravi
am 14 Dez. 2023
Let A be your Interval test signal in timeseries format. Then
Pulses_1_3secs = nnz(out.A.Data((out.A.Time >= 1) & (out.A.Time <= 3))
4 Kommentare
Robert
am 14 Dez. 2023
Image Analyst
am 14 Dez. 2023
There are other ways, but yeah, that would work. In each 2 second period, are there the same number of samples (not counts but sample times or elements of your detection vector)? If so, you could use reshape:
data2d = reshape(data1D, numSamplesIn2Sec, []);
countsIn2Secs = sum(data2d, 1);
Robert
am 15 Dez. 2023
madhan ravi
am 15 Dez. 2023


The block under sum block in the second pic is *Unit Delay* block.
The first PWM block *Run at fixed interval* is ticked as model runs at fixed sample time.
Kategorien
Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!