Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the following code, please note the missing sections labeled ? 1 and ? 2 . function [ img ] = examQuestion ( n )

In the following code, please note the missing sections labeled ?1 and ?2.
function [img]= examQuestion (n)
img = zeros(n);
MaxDist =?1;
for i =1:n
for j =1:n
if i == j
img(i,j)=0;
else
distance =?2;
img(i,j)=255*distance/MaxDist;
end
end
end
img = uint8(img);
The output image will have pixel intensity scaled with its distance to diagonal (where i and j are identical), which of the following should replace the missing sections?
Group of answer choices
?1 should be n-1,?2 should be abs(i-j)
?1 should be n-1,?2 should be i
?1 should be n,?2 should be (i+j)/2
?1 should be n,?2 should abs(i-j)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago

Question

e. What do you know about your ethnic background?

Answered: 1 week ago