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.
Fast comparison of values in array
3 次查看(过去 30 天)
显示 更早的评论
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?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 GPU Computing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!