Hi everybody, i have a project for measurement straightness, but to evaluate straightness i need algorithm of minimum zone. please help me.
thanks for your attention.
I think you need first to BubbleSort your data, that if your data is finite not streaming. Then the difference of the values between ends of your sorted data is your Distance between maximum and minimum peaks of your waveform.
I pressumed your data will be in an array structure or in a linked list. Then you Bubble Sort it. Bubble sorting is a standard algorithm in sorting data arrays. Just like a lighter bubbles will float upwards and heavier bubbles will sink downs wards. The same is true in your data. The smallest magnitude data will float to the first index of your data structure and your highest magnitue data will sink to the last index of you data structure. Then you simply take the magnitude difference between your first and last data then you get your minimum Distance.