subject
Engineering, 14.11.2019 06:31 mia3128

Write a function, in the programming language of your choice, which finds contiguous regions (or "islands") in a matrix where all values in the island are greater than a threshold (but not necessarily the same). the function should take a threshold, a minimum island size, and an arbitrarily sized matrix as inputs. the function should output a matrix (same size as the input matrix) of booleans. do not wrap around matrix edges. corner neighbors are not sufficient for island continuity. for example, if the the inputs are: threshold = 5, min island size = 3, and matrix = [4, 4, 4, 2, 2; 4, 2, 2, 2, 2; 2, 2, 8, 7, 2; 2, 8, 8, 8, 2; 8, 2, 2, 2, 8]. then the output would be [0, 0, 0, 0, 0; 0, 0, 0, 0, 0; 0, 0, 1, 1, 0; 0, 1, 1, 1, 0; 0, 0, 0, 0, 0].

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Different types of steels contain different elements that alter the characteristics of the steel. for each of the following elements, explain what the element does when alloyed with steel.
Answers: 2
question
Engineering, 04.07.2019 18:10
Water at the rate of 1 kg/s is forced through a tube with a 2.5 cm inner diameter. the inlet water temperature is 15°c, and the outlet water temperature is 50°c. the tube wall temperature is 14°c higher than the local water temperature all along the length of the tube. what is the length of the tube?
Answers: 3
question
Engineering, 04.07.2019 18:20
Asimple rankine cycle uses water as the working fluid. the water enters the turbine at 10 mpa and 480c while the condenser operates at 6 kpa. if the turbine has an isentropic efficiency of 80 percent while the pump has an isentropic efficiency of 70 percent determine the thermal efficiency
Answers: 1
question
Engineering, 06.07.2019 02:30
Define thermoplastic polymers and thermosetting polymers in terms of their structures, and (ii) describe briefly a process suitable for the production of products from each type of polymer.
Answers: 3
You know the right answer?
Write a function, in the programming language of your choice, which finds contiguous regions (or "is...
Questions
Questions on the website: 13722363