Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

The meshc() command takes complex inputs.(a) True(b) FalseThe question was posed to me in unit test.My enquiry is from Three-Dimensional Plots topic in division MATLAB Graphics of MATLAB

Answer»

The CORRECT CHOICE is (b) False

The best explanation: The meshc() command does not TAKE complex inputs. MATLAB will RETURN an error if any such input is given.

2.

What is the slope of the sawtooth waveform generated by the sawtooth command?(a) 1/pi(b) pi(c) 1/(2*pi)(d) 2*piThe question was posed to me during an online interview.I'm obligated to ask this question of Two-Dimensional Plots in section MATLAB Graphics of MATLAB

Answer» CORRECT CHOICE is (a) 1/pi

Explanation: The SLOPE of the sawtooth waveform always has a slope of 1/pi.
3.

The text given to the graphs can be made bold.(a) True(b) FalseThis question was addressed to me in my homework.I'd like to ask this question from Customizing and Manipulating Graphics in portion MATLAB Graphics of MATLAB

Answer» CORRECT choice is (a) TRUE

The explanation: The texts given to the graph can be made BOLD by giving \bf and the writing the text which we want to MAKE it bold. Hence, the above statement is true.
4.

Inline functions can be plotted by the _________ command.(a) ezplot()(b) plot3()(c) plot()(d) cannot be doneI got this question in an online interview.My query is from Two-Dimensional Plots in chapter MATLAB Graphics of MATLAB

Answer»

Right option is (a) ezplot()

Explanation: The ezplot command takes in FUNCTIONS REPRESENTED SYMBOLICALLY. The INPUT is given as a string. So INLINE functions can be given as an input to the ezplot command to get a general graph of the input function.

5.

Which command can be used to generate multiple graphs in the same window?(a) hold on(b) wait(c) not possible without contour command(d) not possibleI have been asked this question during an interview.Question is from Two-Dimensional Plots in chapter MATLAB Graphics of MATLAB

Answer»

The correct answer is (a) hold on

The best explanation: The command used to hold the control to an already generated GRAPH so that further plots can be made on the same window is hold on. The contour command is used to GENERATE graph of the same function on DIFFERENT levels while the hold on command is used to generate GRAPHS of multiple functions in the same window.

6.

The font style of the input text can be changed by the ____(a) fontname{}(b) fontstyle{}(c) fontname()(d) fontname[]I got this question in an internship interview.This interesting question is from Customizing and Manipulating Graphics in chapter MATLAB Graphics of MATLAB

Answer»

Right CHOICE is (a) fontname{}

For explanation: The desired fontname could be given in the style denoted by fontname{}, to the text COMMAND. This will change the font of the text PRINTED in the graph.

7.

How do we create horizontal bar graphs in MATLAB?(a) bar3h()(b) barh()(c) bar3()(d) not possibleThe question was posed to me during an internship interview.This interesting question is from Three-Dimensional Plots topic in section MATLAB Graphics of MATLAB

Answer»

Correct CHOICE is (a) bar3h()

The best EXPLANATION: The Bar3() COMMAND plots vertical 3-D BAR graphs. The bar3h() command plots horizontal bar graphs hence bar3h() is correct.

8.

How can we introduce texts in a graph?(a) Use the text command(b) Use the plot command(c) Use the title command(d) Additional texts not possibleThe question was asked in a national level competition.The above asked question is from Customizing and Manipulating Graphics in portion MATLAB Graphics of MATLAB

Answer»

The CORRECT choice is (a) Use the TEXT COMMAND

For explanation I would say: The plot command will be to plot the GRAPHS only. The title command is used to introduce a title outside the GRAPH. A text can be introduced in a graph by using the text command.

9.

What is the RGB triplet style for yellow?(a) [1 1 0](b) [1 0 1](c) [1 0 0](d) [0 1 1]The question was posed to me in homework.I want to ask this question from Three-Dimensional Plots in portion MATLAB Graphics of MATLAB

Answer»

The correct choice is (a) [1 1 0]

Easy EXPLANATION: The RGB TRIPLET specifies the intensity of Red, YELLOW and Green for a user-specified color input to the surf COMMAND. For yellow, it is defined in MATLAB as [1 1 0].

10.

The command to draw the nature of a function over a default fundamental period is _________(a) ezplot()(b) plot()(c) stem()(d) plot3()I had been asked this question by my school principal while I was bunking the class.The origin of the question is Two-Dimensional Plots topic in division MATLAB Graphics of MATLAB

Answer»

Right option is (a) ezplot()

For explanation: The PLOT, stem and the plot3() COMMAND does not have a default fundamental period, we NEED to DEFINE the period of x-axis. The ezplot command generates a plot of the input FUNCTION over a default fundamental period. This fundamental period is [-2*pi,2*pi].

11.

How many objects are created for 24 texts written in the graph?(a) 22(b) 24(c) 21(d) 2The question was posed to me in a job interview.I would like to ask this question from Customizing and Manipulating Graphics in section MATLAB Graphics of MATLAB

Answer»

The correct choice is (b) 24

The explanation is: The text command WOULD be created 24 objects in the MEMORY for 24 texts ADDED in the graph. It will be able to ACCESS those texts and EDIT them.

12.

What is the default range used by the fplot command?(a) [-5,5](b) (-5,5)(c) No default range(d) No such commandThis question was addressed to me in exam.The above asked question is from Two-Dimensional Plots topic in portion MATLAB Graphics of MATLAB

Answer»

Correct answer is (a) [-5,5]

To explain: The FPLOT command is almost like the ezplot command. It will PLOT the graph of y=f(x) within an INTERVAL [-5,5] as it was defined. This default range can be changed by GIVING a SEPARATE vector input to the fplot() command.

13.

Which command gives a title to the graph plotted by MATLAB?(a) plot() generates the title itself(b) title()(c) hlabel()(d) heading()This question was addressed to me during a job interview.I want to ask this question from Two-Dimensional Plots in section MATLAB Graphics of MATLAB

Answer»

Correct ANSWER is (B) title()

Best explanation: The title() command is used to PROVIDE a title to the graph PLOTTED in MATLAB. It can be provided from the taskbar of the window which opens due to the plot command.

14.

Which command is suitable to change the axes of the graph plotted?(a) axes(b) axis(c) yxaxes(d) no commandThis question was posed to me in my homework.I'm obligated to ask this question of Two-Dimensional Plots in section MATLAB Graphics of MATLAB

Answer» CORRECT CHOICE is (b) axis

Easiest explanation: The axis command can be used to change the interchange the axes of a 2-D plot. This is EASIER than re=-writing the plot command ALREADY used or any other command to generate a 2-d plot. The rest of the options are incorrect.
15.

Which toolbox provides the plot command?(a) Symbolic Maths Toolbox(b) Signal Processing Toolbox(c) Engineering Toolbox(d) FunctionsThe question was posed to me in an interview for job.I would like to ask this question from Two-Dimensional Plots topic in section MATLAB Graphics of MATLAB

Answer» RIGHT ANSWER is (B) Signal Processing Toolbox

The explanation is: The commands in MATLAB are stored in FILES called TOOLBOXES. The plot command is stored in the Signal Processing command while the ezplot command is stored in the Symbolic Maths Toolbox.
16.

A stacked horizontal bar-chart can be made in MATLAB by ___________(a) Mentioning stacked as input to the bar3() command(b) Mentioning stacked as input to the bar3h() command(c) Mentioning stack as input to the bar3[] command(d) Mentioning stacked as input to the bar3h[] commandThis question was posed to me during an interview.My question is taken from Three-Dimensional Plots topic in chapter MATLAB Graphics of MATLAB

Answer»

The correct option is (B) Mentioning stacked as input to the bar3h() COMMAND

To explain I WOULD SAY: The bar3h() command is used to make a horizontal pie chart of a SET of data. The bars can be stacked by giving ‘stacked’ as input to the command.

17.

What is the nature of z in surf(x,y,z)?(a) Integer(b) Vector(c) Matrix(d) StringThe question was posed to me in semester exam.This interesting question is from Three-Dimensional Plots in section MATLAB Graphics of MATLAB

Answer»

Correct choice is (c) Matrix

To explain I would say: The final INPUT to the SURF command, z, should be a matrix. The matrix is computed for each co-ordinate generated and given input INTERMS of x and y.

18.

The general graph of f(a,b)=0 is plotted by ______(a) ezplot()(b) plot()(c) stem()(d) not possibleI got this question in semester exam.I'm obligated to ask this question of Two-Dimensional Plots topic in division MATLAB Graphics of MATLAB

Answer»

Correct choice is (a) ezplot()

Easy explanation: A GENERAL graph of the function can be viewed by USING the ezplot. If we WANT to define the values of a/b, we will use the plot() or STEM() command. Hence, the answer is ezplot().

19.

The command used to generate an array of arrows is ________(a) quiver[](b) arrows()(c) quiver()(d) arrows[]This question was addressed to me in an online interview.This question is from Two-Dimensional Plots in chapter MATLAB Graphics of MATLAB

Answer» CORRECT choice is (C) quiver()

The best I can explain: The command quiver is used to GENERATE an array of arrows. This command is used during plotting FIELDS in 2-D. It is used to show the direction of strength of the field that is being PLOTTED.
20.

What is the period of the sawtooth() waveform which is generated by the sawtooth() command?(a) 2*pi(b) pi*2(c) pi(d) 3*pi/2This question was addressed to me in semester exam.My question is based upon Two-Dimensional Plots topic in division MATLAB Graphics of MATLAB

Answer»

The correct ANSWER is (a) 2*pi

For explanation: The SAWTOOTH() command GENERATES a sawtooth waveform which changes it’s PEAK from -1 to 1 in the PERIOD 2*pi. This is inbuilt in MATLAB and so the correct answer is 2*pi.

21.

How can we smoothen the following graph of sin (t) and cos (t) into a circle?(a) reduce the gap between linearly spaced elements of the dependent variable t(b) reduce the gap between elements of the dependent variable t(c) increase the gap between linearly spaced elements of the dependent variable t(d) increase the gap between elements of the dependent variable tI got this question by my school principal while I was bunking the class.My question is taken from Two-Dimensional Plots in division MATLAB Graphics of MATLAB

Answer»

Correct answer is (a) reduce the GAP between linearly spaced ELEMENTS of the dependent variable t

To explain: If we reduce the gap between the linearly spaced VARIABLES of t, the curvature of sin(t) would be clearly plotted by the PLOT command. Hence, the resultant curve would be a circle.

22.

The ezsurf command is present in the ___________(a) Symbolic Math Toolbox(b) Statistics and Machine Learning Toolbox(c) Partial Differentiation Equation Toolbox(d) Neural Network ToolboxThe question was asked by my school principal while I was bunking the class.My question is based upon Three-Dimensional Plots in section MATLAB Graphics of MATLAB

Answer»

Correct option is (a) Symbolic MATH TOOLBOX

Explanation: The ezsurf COMMAND can be ACCESSED from the Symbolic Toolbox. The rest of the Toolboxes does not have that command.

23.

colorbar command gives different color to the bar chart following their ______(a) height(b) width(c) length(d) independentlyI had been asked this question in final exam.My doubt is from Three-Dimensional Plots in division MATLAB Graphics of MATLAB

Answer»

The CORRECT option is (a) height

The EXPLANATION: The height of the bar-chart gives a measure of the data being shown. The colorbar command gives DIFFERENT COLOR to the bar chart FOLLOWING their height.

24.

What is the size of the z vector in a mesh(x,y,z) if the sizes of x and y vectors are m, n respectively?(a) [m,n](b) (m,n)(c) [m,n)(d) Independent of m and nI have been asked this question in semester exam.The doubt is from Three-Dimensional Plots topic in portion MATLAB Graphics of MATLAB

Answer»

The CORRECT OPTION is (a) [m,N]

For explanation I would say: The SIZE of the z vector is dependent on the size of the x and vectors. The PERMISSIBLE size lies between [m,n] and hence [m,n] is correct.

25.

Which command enables a title for the x-axis?(a) xlabel()(b) horilabel()(c) xlabel[](d) no commandI have been asked this question in an interview for job.This key question is from Two-Dimensional Plots topic in division MATLAB Graphics of MATLAB

Answer»

Right ANSWER is (a) xlabel()

To EXPLAIN: The xlabel() command is used to include a title to SIGNIFY the x-axis of the graph plotted in MATLAB. HENCE, the only correct OPTION is xlabel().

26.

How many objects are created for 24 texts written in the graph?(a) 22(b) 24(c) 21(d) 2The question was asked in an international level competition.My doubt stems from Customizing and Manipulating Graphics topic in division MATLAB Graphics of MATLAB

Answer» RIGHT choice is (b) 24

Easiest explanation: The text COMMAND would be created 24 OBJECTS in the memory for 24 TEXTS added in the graph. It will be able to ACCESS those texts and edit them.
27.

What does the set command do?(a) The operation of the fill command(b) The operation of changing intervals of axes(c) The operation of the plot command(d) The operation of the figure commandI had been asked this question in class test.The origin of the question is Customizing and Manipulating Graphics in chapter MATLAB Graphics of MATLAB

Answer» RIGHT choice is (b) The operation of changing intervals of axes

The best I can explain: The SET command can edit the graphics objects created in MATLAB. It cannot plot a graph HENCE it does not perform the operation of the plot, stem or the figure command.
28.

The default colour of graph generated by the plot command is blue.(a) True(b) FalseThe question was posed to me during an online interview.This intriguing question originated from Customizing and Manipulating Graphics in section MATLAB Graphics of MATLAB

Answer»

The correct OPTION is (a) True

To explain I would say: The DEFAULT color of the graph GENERATED by the plot/stem command is blue. I TCAN be CHANGED from the plot command itself or the set command.

29.

In a 2-d Plot, which command will make the axes of the graph same?(a) axis square(b) axis equals(c) axes square(d) axes equalI got this question during an interview.The origin of the question is Two-Dimensional Plots in section MATLAB Graphics of MATLAB

Answer»

Right choice is (a) axis square

To explain I would say: There is no such COMMAND called AXES. The command axis is USED to change the axes of the graph that has been plotted in MATLAB. axis equal would’ve made the axes of equal length but axis equals has equals. axis square is the only CORRECT OPTION.

30.

What is the short name for black as input to the surf command?(a) b(b) bl(c) k(d) blkI had been asked this question during an interview for a job.Question is from Three-Dimensional Plots topic in division MATLAB Graphics of MATLAB

Answer»

The CORRECT choice is (C) k

Easiest EXPLANATION: The short name for black has been defined in MATLAB as ‘k’. So to make the color black, we need to give k as input to the surf command.

31.

How can several graphs for the same function be plotted on the same window?(a) Contour plots(b) Bode plots(c) 3-D plots(d) n-D plotsThe question was asked in final exam.The above asked question is from Two-Dimensional Plots topic in division MATLAB Graphics of MATLAB

Answer»

Right ANSWER is (a) Contour plots

The EXPLANATION: Contour plots allow the plot of multiple CURVES of the same function on different CONSTANT levels of the function. This is extremely helpful in analyzing systems.

32.

What is the range of RGB triplets for the surf command?(a) [1 0](b) [0 1](c) (0 1)(d) (0 1]This question was posed to me in final exam.I want to ask this question from Three-Dimensional Plots in section MATLAB Graphics of MATLAB

Answer»

Right answer is (B) [0 1]

To explain I would say: The RANGE of RGB triplets for the surf command is pre-defined in MATLAB as [0 1].If any other value is GIVEN as INPUT, MATLAB will give an error.

33.

Which command enables a title for the y-axis?(a) vertlabel()(b) ylabel()(c) ylabel[](d) no commandI have been asked this question in homework.The question is from Two-Dimensional Plots in division MATLAB Graphics of MATLAB

Answer»

Right OPTION is (B) ylabel()

Best explanation: The command ylabel is used to name the y AXIS of the graph plotted in MATLAB. Hence, option ylabel() is CORRECT.

34.

A semi-log graph cannot be plotted in MATLAB.(a) True(b) FalseThe question was asked in quiz.My question is taken from Customizing and Manipulating Graphics topic in division MATLAB Graphics of MATLAB

Answer»

Correct choice is (b) False

The best I can explain: The scales of the axes can be converted to a linear and logarithmic scales with the SET COMMAND. Hence, the above STATEMENT is false.

35.

The fill command cannot take more than ______ inputs.(a) 1(b) 3(c) 2(d) ManyThe question was asked by my school principal while I was bunking the class.This intriguing question comes from Customizing and Manipulating Graphics topic in section MATLAB Graphics of MATLAB

Answer»

The CORRECT option is (c) 2

Easiest explanation: The fill command ca only take 2 inputs. MATLAB will return an error if more than 2 inputs are GIVEN to the fill command.

36.

The limits of the axes drawn are only specified in the command used to plot the graph itself.(a) True(b) FalseThis question was addressed to me in quiz.I want to ask this question from Two-Dimensional Plots topic in portion MATLAB Graphics of MATLAB

Answer»

The correct choice is (b) False

To EXPLAIN: The axis COMMAND can be used to define the limits of the axis present on the graph that is being plotted. The x-axis of the graph would contain VALUES according to the input to the plot/stem command but the visible part of the graph in the NEW window will depend on how the length of the axes are DEFINED by the axis command.

37.

The period of sinusoidal curves can be changed in MATLAB.(a) True(b) FalseThis question was addressed to me in an online quiz.My doubt stems from Two-Dimensional Plots in division MATLAB Graphics of MATLAB

Answer»

Correct option is (a) True

For EXPLANATION: The SIN() command is defined to generate a sinusoid with a fundamental time PERIOD of 2*pi. The period of sinusoid can be changed by changing the angular frequency while GIVING input to the sine command.

38.

The color density of the bar-chart drawn from the bar3() command is always proportional to the height of the bars.(a) True(b) FalseThis question was addressed to me in unit test.Query is from Three-Dimensional Plots in portion MATLAB Graphics of MATLAB

Answer»

Correct ANSWER is (B) False

Explanation: The following statement is not NECESSARILY true. The color density can be made inversely proportional to the height of the bars by giving the DIRECTION of color density as reverse as an input to the bar3() command.

39.

What is the period of square wave generated by the square() command?(a) User-defined(b) pi(c) 2*pi(d) pi/2The question was posed to me during a job interview.My doubt is from Two-Dimensional Plots topic in division MATLAB Graphics of MATLAB

Answer» CORRECT option is (C) 2*pi

Explanation: The square waves GENERATED by the square(0 command will always have a PERIOD of 2*pi. We can change the duty CYCLE of the wave but the fundamental period is 2*pi.
40.

A power pattern for an antenna is a __________(a) 4-D plot of space and power(b) 3-D plot of space and power(c) 2-D plot of space and power(d) Nothing called power patternThe question was asked in an interview for job.This interesting question is from Two-Dimensional Plots topic in portion MATLAB Graphics of MATLAB

Answer» CORRECT option is (C) 2-D PLOT of space and power

Best explanation: The power pattern of the antenna is a 2-d polar plot of the power RADIATED by the antenna w.r.t theta in cylindrical co-ordinates. Hence, 2-d plot of space and power is only correct.
41.

Using the set command for axes can be replaced by setting the ___ to a variable.(a) gca(b) gcf(c) gco(d) not possibleThis question was addressed to me in semester exam.This key question is from Customizing and Manipulating Graphics topic in section MATLAB Graphics of MATLAB

Answer»

The CORRECT choice is (a) gca

The explanation: The gca is USED as an object to represent the axes. The properties of the axes are CONTAINED in the gca. The gca can be assigned to a variable and now we don’t have to USE the set COMMAND to edit the axes of the graph. The gcf is used to represent the graph plotted.

42.

How can we group the elements in a 3-d bar graph?(a) Give ‘grouped’ as style input to bar3() command(b) Give ‘grouped’ as style input to bar() command(c) Give ‘group’ as style input to bar3() command(d) Give ‘group’ as style input to bar() commandI got this question in an interview for job.This key question is from Three-Dimensional Plots topic in portion MATLAB Graphics of MATLAB

Answer»

Right option is (a) Give ‘GROUPED’ as style input to bar3() command

To explain I would SAY: A 3-d bar graph is created with the bar3() command. The elements of each row of the input VECTOR can be grouped together by giving a STRING input ‘grouped’ to the bar3() command.