Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Find Average of elements having less difference among each other

1 Ansicht (letzte 30 Tage)
Tahir Mahmood
Tahir Mahmood am 5 Apr. 2019
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hi, Lets say, A=[20,10,22,10,12]. I want to calculate the difference among each element in the A. If the difference is less than 5 or 0, then average all that elements. So for this case, the result will be.
(20+22)/2 and (10+10+12)/3
Result=[21,10]. How to do it?

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by