Given a 2D array that has been converted to binary, for some binary array index values, how do you find the corresponding values ββin the original?
Maybe something to use ind2sub?
No, you can index directly.
%# create some test data m = magic(4); %# make binary image bw = m>10; %# read values from m values = m(bw); %# alternatively, if you have linear indices (as found via find)... linIdx = find(bw); %# ...you can use that instead values = m(linIdx);
You can save a 2D structure using element multiplication.
m = magic(4); bw = m>10; m .* bw
Source: https://habr.com/ru/post/1744367/More articles:Javascript serialization - javascriptWhy does Python print string and unicode with the same value in different ways? - pythonChoosing the first instance of a class but not nested instances via jQuery - jqueryCompare the sign of two two-local - doublehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1744366/css-center-an-oversized-div-inside-a-table-cell-which-is-too-small&usg=ALkJrhh8xFRWiSml06GxrKAzqEHbZqOdSgTypedef in C # over multiple source files - c #C # Serial Communications - Received Data Lost - c #Mysql log warnings - mysqlΠΡΠ΅ΡΡΠ²ΠΈΡΡΠ°Ρ "ΠΠ΅ Π²ΡΠ±ΡΠ°Π½Π° Π±Π°Π·Π° Π΄Π°Π½Π½ΡΡ " Π² PHP/MySQL? - linuxCapistrano error while deploying to slicehost - ruby ββ| fooobar.comAll Articles