adplus-dvertising

Welcome to the MATLAB Programming MCQs Page

Dive deep into the fascinating world of MATLAB Programming with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of MATLAB Programming, a crucial aspect of MATLAB. In this section, you will encounter a diverse range of MCQs that cover various aspects of MATLAB Programming, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within MATLAB.

frame-decoration

Check out the MCQs below to embark on an enriching journey through MATLAB Programming. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of MATLAB.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of MATLAB Programming. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

MATLAB Programming MCQs | Page 1 of 17

Explore more Topics under MATLAB

Q1.
What is the output of the following command?
function s= average(varargin)
celldisp(varargin)
s=sum(varargin)
end
p=average(1:3)
Discuss
Answer: (a).Error in sum
Q2.
What is the output of the following command?
function wish= ful(p,varargin)
celldisp(p)
wish=sin(varargin{1})
end
p=ful(1:3)
Discuss
Answer: (b).Error in celldisp
Q3.
What is the output of the following command?
function mad= heart(p,varargin)
disp(p)
wish=sin(varargin{0})
end
p=heart(1:3,0)
Discuss
Answer: (a).Error in wish command
Q4.
What is the output of the following command?
function mad= rush(p,varargin)
disp(p)
wish=cos(varargin[0])
end
p=rush(1:3,pi/2)
Discuss
Answer: (b).Error due to syntax of varargin
Q5.
What is the output of the following code?
function mad= rush(p,varargin)
disp(p)
wish=cos(varargin{1})
end
p=rush(1:3,Inf)
Discuss
Answer: (d). p{1}= 1 2 3
wish=NaN
Q6.
What is the output of the following code?
function maha= orchid(polo,varargin)
disp(polo)
wish=sum(varargin{1,2})
end
p=rush(-1:1,Inf)
Discuss
Answer: (a).Logical error in varargin
Q7.
What is the output of the following code?
function [die,absdif] = BDO(y,x)
die = y-x;
if nargout > 1
    disp('Boo !')
    absdif = abs(die);
end
end
[p,q]=BDO(Inf,Inf)
Discuss
Answer: (a). Boo!
p=NaN
q=NaN
Q8.
What is the output of the following code?
function [die,af] = Bod(y,x)
die = y*x;
if nargout < 1
    error('Boo !')
 else
   disp(โ€˜Yo !โ€™)
   af = abs(die);
end
end
[p]=Bod(1,[1 -2])
Discuss
Answer: (d). Yo !
p=-2
Q9.
What is the output of the following code?
function [die,af] = lola(y,x)
die = y*x;
if nargout < 1
    error('Boo !')
 else
   disp(โ€˜Yo !โ€™)
   af = abs(die);
end
end
p=lola(1,[1 -2])
Discuss
Answer: (a).Error with Boo ! written
Discuss
Answer: (c).can be run in the command window by defining it in a script file

Suggested Topics

Are you eager to expand your knowledge beyond MATLAB? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!