Hi,

I have a series of measured voltages which are currently being written to a 
Python List.  As apart of the processing of these numbers, I need to calculate 
the average value, the minimum value and the element position of the minimum 
value in the List.

For example, I have got:

Vmeas = [3.125,3.122,3.112,3.126]

Using plain old Python, I can calculate the mean and find the minimum value, 
but apparently I need to use numpy to find which element contains that minimum 
value.  I found this page:

https://www.science-emergence.com/Articles/Find-nearest-value-and-the-index-in-array-with-python-and-numpy/

but it doesn't give me the correct element when I run the exact code for a 1D 
array from that site, either in a Python shell as indicated there or as part 
of my program .  I just get any old value.

Can anyone help?

-- 



                Terry Coles



--
  Next meeting: BEC, Bournemouth, Tuesday, 2019-02-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to