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

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 15:10, breannaasmith1122
Two flowing streams of argon gas are adiabatically mixed to form a single flow/stream. one stream is 1.5 kg/s at 400 kpa and 200 c while the second stream is 2kg/s at 500 kpa and 100 ? . it is stated that the exit state of the mixed single flow of argon gas is 150 c and 300 kpa. assuming there is no work output or input during the mixing process, does this process violate either the first or the second law or both? explain and state all your assumptions.
Answers: 1
image
Engineering, 04.07.2019 18:10, ashleybaber4966
If a particle moves along a path such that r : (3 sin t) m and ? : 2t rad, where t is in seconds. what is the particle's acceleration in m/s in 4 seconds? a)- 16.43 b)- 16.29 c)- 15.21 d)- 13.79
Answers: 1
image
Engineering, 04.07.2019 18:10, michellerosas
Ajournal bearing has a journal diameter of 3.250 in with a unilateral tolerance of 20.003 in. the bushing bore has a diameter of 3.256 in and a unilateral tolerance of 0.004 in. the bushing is 2.8 in long and supports a 700-lbf load. the journal speed is 900 rev/min. find the minimum oil film thickness and the maximum film pressure for both sae 20 and sae 20w-30 lubricants, for the tightest assembly if the operating film temperature is 160°f. a computer code is appropriate for solving this problem.
Answers: 3
image
Engineering, 04.07.2019 18:10, demarcuswiseman
Calculate the bore of a cylinder that has a stroke of 18 inches and an extension time of 6 seconds at a flow rate of 4 gal/min.
Answers: 3
You know the right answer?
Write a function, in the programming language of your choice, which finds contiguous regions (or "is...

Questions in other subjects:

Konu
Mathematics, 06.01.2021 20:40
Konu
Mathematics, 06.01.2021 20:40
Konu
Mathematics, 06.01.2021 20:40
Konu
Mathematics, 06.01.2021 20:40