I have the following code in a rather large script, which unfortunately is VERY slow:
if ismember(table1.Loc(x),Loc_all(y)) == 1
table1.dur(x) = t_avg(y);
It definitely works, but again the duration time is not "workable".
So I tried the following:
f = ismember(table1.Loc,Loc_all) == 1;
table1.dur(IndexM) = t_avg(IndexN);
It works for IndexM which defines the location in table1.Loc - but it wont work for IndexN - all I get here is 1's. What am I missing?
As you can see t_avg and Loc_all have the same size, as do table1.Loc and table1.dur - I'm expecting IndexN to give the Location in Loc_all where a match happens.
Loc_all only has unique values. table1.Loc is a large table of values which may or may not be in Loc_all.
Any hints are very much appreciated!