How to impliment logical indexing faster in matlab? [closed]
How to impliment logical indexing faster in matlab? [closed] I have several matrices that I need to add to one large matrix. The large matrix (300002x50) is split up by .001 seconds and the timing for the other 49 matricies (14250x2) are roughly .02 apart, but not uniformly distributed. I have tried find to index the entries from the smaller matrices into the larger matrix, but it was too slow. I have since tried: find for a = 1:length(test) aaa = abs(AF1(:,1)-test(a,1))<10^-6; AF1(aaa,index)=test(a,2); end Where test is a 14250x2 double (time,data) , AF1 is a 300002x50 double matrix and index is which column in AF1 the data will be added to. It was a bit faster, but it still takes up 99.3% (29 minutes) of the time. It works how I want it, but is there any way to implement this in a faster manner? test (time,data) AF1 index AF1 Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. A...