Explore topic-wise MCQs in Matlab.

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

1.

If solve does not return any solution, what does it imply?

A. The equation has no definite solution
B. The equation has a solution for a specific interval
C. The equation may be solvable but the function ‘solve’ cannot produce a solution
D. There is no function ‘solve’
Answer» D. There is no function ‘solve’
2.

What happens if dsolve does not return any numerical solution?

A. The equations have no solution
B. The equations have a trivial solution
C. The equations have infinite no. of solutions
D. The equation has to be solve separately
Answer» E.
3.

Which program can help to solve the following differential equation?

A. syms y(t) a;equn = diff(y,t)==b*y;cnd=y(0)==5;ySol(t)=dsolve(equn,cnd)
B. syms y(t) a;eqn = diff(y,t) == a*y;ySol(t) = dsolve(eqn,(y(0)=5);
C. syms y(t) a;eqn=diff(y,t)=a*y;cond=y(0)==5 sol(t)=dsolve(eqn,cond);d) sym y(t) a; eqn=diff(y,t)==a*y;cond=y(0)==5;sol(eqn,con
D. syms y(t) a;eqn = diff(y,t) == a*y;ySol(t) = dsolve(eqn,(y(0)=5);c) syms y(t) a;eqn=diff(y,t)=a*y;cond=y(0)==5 sol(t)=dsolve(eqn,cond);d) sym y(t) a; eqn=diff(y,t)==a*y;cond=y(0)==5;sol(eqn,cond);View Answer
Answer» B. syms y(t) a;eqn = diff(y,t) == a*y;ySol(t) = dsolve(eqn,(y(0)=5);
4.

Find the error in the following code?

A. Predicted output is same as present output after math magic
B. solve(a*x2 + b*x + c == 0)
C. vpa(solve(a*x2 – b*x + c == 0))
D. solve(a*x2 – b*x + c == 0)View Answer
Answer» E.
5.

What should be the output for the following code?

A. Nan
B. -0.000000000000000000000000117191203927370461282452866337
C. -1.1719e-25
D. fzero is not a functionView Answer
Answer» B. -0.000000000000000000000000117191203927370461282452866337
6.

An employer has to minimize the number of lines in a program while writing the code for a purpose. If the purpose is to find the root of the following equation, which function is to be used?

A. polyval()
B. solve[]
C. sol[]
D. roots([])View Answer
Answer» E.
7.

Predicted output is same as present output after math magic$

A. solve(a*x<sup>2</sup> + b*x + c == 0)
B. vpa(solve(a*x<sup>2</sup> – b*x + c == 0))
C. solve(a*x<sup>2</sup> – b*x + c == 0)
Answer» D.
8.

A student has to find the solution of an equation cos(x)=1/2. She has to write the program such that exact values are shown at output. Which of the following codes would help her?

A. syms x;eqn = cos(x) == 1/2;vpa( solve(eqn,x))
B. syms x;eqn = cos(x) == 1/2;solve(eqn,x)
C. vpa(solve(‘cos(x)=1/2’))
D. syms x;eqn = cos(x) = 1/2;vpa(solve(eqn,x))
Answer» B. syms x;eqn = cos(x) == 1/2;solve(eqn,x)
9.

The solve[] command can do which of the following things?

A. Produce the exact solution
B. Produce a symbolic solution
C. Produces exact roots
D. Produces complex roots
Answer» B. Produce a symbolic solution
10.

What is the difference between sqrt(10) and sqrt(sym(10))?

A. There is no difference
B. sqrt(sym(10)) is incorrect
C. There is no function as sqrt
D. sqrt(10) returns exact value while sqrt(sym(10)) returns 10<sup>(1/2)</sup>
Answer» C. There is no function as sqrt
11.

What is the syntax to solve simultaneous equations easily?

A. solve[“equation-1”,”equation-2”];
B. sol[“equation-1” “equation-2”];
C. sol[‘equation-1’‘equation-2’];
D. solve[‘equation-1’,‘equation-2’];
Answer» E.