Question 45 In the following code, please note the missing sections labeled ?1?. ?2? and ?3?. function [final] = examQuestion (mat) [m, n,~] = size (mat); final uint8 (zeros( ?1 2)); for i = ?2? if mod (1,2) == 1 + odd index for 11:n end final (1,1,1) mat ((1+1)/2,3,1); final (1,3,2) mat ((1+1)/2,3,2); final (1, 3, 3) mat ((1+1)/2,3,3); ?3? + even index and for j = 1:n end final (i,j, 1) mat (1/2,1,1)/2+mat (1/2+1,1,1)/2; final (1,1,2) mat (1/2,1,2)/2+mat (1/2+1,1,2)/2; final (1,3,3) mat (1/2,1,3)/2+ mat (1/2+1,1,3)/2; end The final image should be the image in mat with the number if rows increased. Rows should be placed in between existing rows, with element values being the average of the row above and the row below. Which of the following should replace the missing sections? O?1? should be (2'm-1.n.3) ?2? should be 1.m 3 should be elseif O?1? should be (m2n-1.3) 12? should be 1:m 13 should be end O ?1? should be (2m-1.2"-13) 12? should be 1:2'm-1 13 should be elseif mod(12)--0 ?1? should be (2'm-1.n.3) 12 should be 1:2'm-1 13 should be else 2 pts

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Solve fast as soon asap
Question 45
In the following code, please note the missing sections labeled ?1?. ?2? and ?3?.
function [final] = examQuestion (mat)
[m, n,~] = size (mat);
final uint8 (zeros( ?1 2));
for i = ?2?
if mod (1,2) == 1 + odd index
for 11:n
end
final (1,1,1) mat ((1+1)/2,3,1);
final (1,3,2) mat ((1+1)/2,3,2);
final (1, 3, 3) mat ((1+1)/2,3,3);
?3? + even index
and
for j = 1:n
end
final (i,j, 1) mat (1/2,1,1)/2+mat (1/2+1,1,1)/2;
final (1,1,2) mat (1/2,1,2)/2+mat (1/2+1,1,2)/2;
final (1,3,3) mat (1/2,1,3)/2+ mat (1/2+1,1,3)/2;
end
The final image should be the image in mat with the number if rows increased. Rows should be placed in between existing rows, with element values being the average of the row above and the row below. Which of the following should replace the missing sections?
O?1? should be (2'm-1.n.3)
?2? should be 1.m
3 should be elseif
O?1? should be (m2n-1.3)
12? should be 1:m
13 should be end
O ?1? should be (2m-1.2"-13)
12? should be 1:2'm-1
13 should be elseif mod(12)--0
?1? should be (2'm-1.n.3)
12 should be 1:2'm-1
13 should be else
2 pts
Transcribed Image Text:Question 45 In the following code, please note the missing sections labeled ?1?. ?2? and ?3?. function [final] = examQuestion (mat) [m, n,~] = size (mat); final uint8 (zeros( ?1 2)); for i = ?2? if mod (1,2) == 1 + odd index for 11:n end final (1,1,1) mat ((1+1)/2,3,1); final (1,3,2) mat ((1+1)/2,3,2); final (1, 3, 3) mat ((1+1)/2,3,3); ?3? + even index and for j = 1:n end final (i,j, 1) mat (1/2,1,1)/2+mat (1/2+1,1,1)/2; final (1,1,2) mat (1/2,1,2)/2+mat (1/2+1,1,2)/2; final (1,3,3) mat (1/2,1,3)/2+ mat (1/2+1,1,3)/2; end The final image should be the image in mat with the number if rows increased. Rows should be placed in between existing rows, with element values being the average of the row above and the row below. Which of the following should replace the missing sections? O?1? should be (2'm-1.n.3) ?2? should be 1.m 3 should be elseif O?1? should be (m2n-1.3) 12? should be 1:m 13 should be end O ?1? should be (2m-1.2"-13) 12? should be 1:2'm-1 13 should be elseif mod(12)--0 ?1? should be (2'm-1.n.3) 12 should be 1:2'm-1 13 should be else 2 pts
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education