Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab Question Looking at the following code: function out 1 = examQuestion ( in 1 , in 2 ) % Assume that in 1 and

Matlab Question Looking at the following code:
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
Elements in odd column with index j will be smaller than that in column j+1
Even columns will have lesser value than the column to its left
Output matrix has same dimension as the input matrices
This code does not consider the situation where in2(i,j)== in1(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

The Database Factory Active Database For Enterprise Computing

Authors: Schur, Stephen

1st Edition

0471558443, 9780471558446

More Books

Students also viewed these Databases questions