Borrar filtros
Borrar filtros

Fast comparison of values in array

1 visualización (últimos 30 días)
Shane
Shane el 30 de Jun. de 2014
Editada: Cedric el 30 de Jun. de 2014
I am using a data acquisition card pulling in data at MHz rates. I am needing to do a comparison of this data and threshold it.
I.E. I have an array of 10,000 variables. I want to find all values less than 50 and set equal to one and everything greater than or equal to 50 as 0.
But I want to continuously do this over and over, as fast as possible. I am current just doing
myResults = data < threshold;
Is there anyway to do this faster? Are there maybe specific sizes of the array that would be faster? Or is there anyway fancy way to make it faster?
It seems to be non mulch-threaded, anyway to make it take advantage of multiple CPUs?
  1 comentario
Matt J
Matt J el 30 de Jun. de 2014
It should be multi-threaded already. 10000 isn't a very big data size, though, and that may be why you don't see MATLAB firing all thrusters. You should gather a bigger data set before thresholding.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre GPU Computing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by