Find the indices of occurence of an ordered array in a vector - Matlab -
Find the indices of occurence of an ordered array in a vector - Matlab -
i have 2 arrays a = [1,-1,0,0,1,-1,1,-1,0];b = [1,-1];
i want find occurrence of b in a(not of values of b in a). want 1 followed -1 occurrence indices in a.
the expected output [1,5,7].
i have tried ismember
, find
functions in matlab. did not result want.
strfind want: strfind(a,b)
documentation not mention, can utilize doubles chars.
arrays matlab find
Comments
Post a Comment