Question: Exercise 5 (4 pts) The following MATLAB pattern detector scans image matrix A for TWO DIFFERENT PATTERN TYPES, as indicated by the form of the
Exercise 5 (4 pts) The following MATLAB pattern detector scans image matrix A for TWO DIFFERENT PATTERN TYPES, as indicated by the form of the IF/ELSEIF construction. Each pattern's count is recorded separately, and stored either in the variable counterA or in the variabie counterB. What are the final values stored in variables counterA and counterb when the follo MATLAB pattern detector program finishes execution? matrix A. Please use two different colors, one color for the first pattern, and a s color for the second pattern. wing Cirele each pattern type found in cleariclc A-15 364304205 2 3300262 0O22 343 2 6 0 3 2 3 620363 31 counterA = 0; counterB-0 for row- 1:10 for col- 1:8 if (A(row, col) A(row, col+1)&.. A (row, col+1)> A(row, colt2)) counterB counterB + 1; end end end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
