How to search array in array same values?
Hello,
I create an array below;
bigArray = rand(1,150);
bigArray(1,15:19) = [1 1 1 1 1]’;
bigArray(1,25:29) = [1 1 1 1 1]’;
bigArray(1,75:79) = [1 1 1 1 1]’;
bigArray(1,105:109) = [1 1 1 1 1]’;
bigArray(1,65) = 1;
bigArray(1,5:6) = [1 1]’;
I want to find [1 1 1 1 1]’ array indexes. But I run the code;
idx = find(ismember(bigArray,[1 1 1 1 1]’))
I want to see as an output; [15 16 17 18 19 25 26 27 28 29 75 76 77 78 79 105 106 107 108 109]Hello,
I create an array below;
bigArray = rand(1,150);
bigArray(1,15:19) = [1 1 1 1 1]’;
bigArray(1,25:29) = [1 1 1 1 1]’;
bigArray(1,75:79) = [1 1 1 1 1]’;
bigArray(1,105:109) = [1 1 1 1 1]’;
bigArray(1,65) = 1;
bigArray(1,5:6) = [1 1]’;
I want to find [1 1 1 1 1]’ array indexes. But I run the code;
idx = find(ismember(bigArray,[1 1 1 1 1]’))
I want to see as an output; [15 16 17 18 19 25 26 27 28 29 75 76 77 78 79 105 106 107 108 109] Hello,
I create an array below;
bigArray = rand(1,150);
bigArray(1,15:19) = [1 1 1 1 1]’;
bigArray(1,25:29) = [1 1 1 1 1]’;
bigArray(1,75:79) = [1 1 1 1 1]’;
bigArray(1,105:109) = [1 1 1 1 1]’;
bigArray(1,65) = 1;
bigArray(1,5:6) = [1 1]’;
I want to find [1 1 1 1 1]’ array indexes. But I run the code;
idx = find(ismember(bigArray,[1 1 1 1 1]’))
I want to see as an output; [15 16 17 18 19 25 26 27 28 29 75 76 77 78 79 105 106 107 108 109] matlab, array, find, indexing MATLAB Answers — New Questions