Question: function out 1 = examQuestion ( in 1 , in 2 ) % Assume that in 1 and in 2 are the same size [

function out1= examQuestion(in1,in2)
%Assume that in1 and in2 are the same size
[m, n]= size(in1);
out1= zeros(m,n*2);
for i =1:1:m
for j =1:1:n
if in2(i,j)> in1(i,j)
out1(i,j*2-1)= in1(i,j);
out1(i,j*2)= in2(i,j);
else
out1(i,j*2-1)= in2(i,j);
out1(i,j*2)= in1(i,j);
end
end
end
Which of the following statements is TRUE?
Group of answer choices
This code does not consider the situation where in2(i,j)== in1(i,j)
If j is even, elements in column j will be less than the elements in column j+1.
The output matrix has same dimension as the input matrices
If j is odd, elements in column j will be less than the elements in column j+1.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!