This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Integration – 1”.

1. The int() function gives the __________

a) general solution of the ODE

b) general solution of the function

c) particular integral of a function

d) complementary function

View Answer

Explanation: ODE solvers gives a general solution of an ODE. But the int() function will give the particular integral of a function without any constant term.

2. What will be the command to find the current through a 1H inductor (no initial current) whose voltage changes by v=t^{2}?

a) int(‘t^{2}’)

b) intg(‘t^{2}’)

c) int(t^{2})

d) Cannot be determined

View Answer

Explanation: We can only integrate our voltage equation to get the current as a function of time. The syntax for int(t

^{2}) is the correct syntax for the int() command. The rest is wrong since the int() command does not take string arguments.

3. The command quad() cannot do ______ integrals.

a) Definite

b) Indefinite

c) Particular

d) Any

View Answer

Explanation: If we introduce infinity as an argument to our command ‘quad()’, it will result in an error. This is because it will not take Inf as an input limit. It can do definite integral over a finite range.

4. The code quad(‘x.^2’,-3,2) is same as ___________

a) quad(‘x.^2’,-2,3)

b) quad(‘x.^2’,-3,2)

c) quad(x.^2,3,-2)

d) quad(‘x^2’,-2,-3)

View Answer

Explanation: Since the first limit provided to our quad command is a lower limit, we will get the answer same for the code quad(‘x.^2’,-2,3). We need to give the input function with the ‘ . ‘ operator since we are computing the value for every instant and it is adding up.

5. The capacitor voltage due to a current of i=t^{4}with v(0^{+})=3 is found from using _________

a) ODE solver

b) int() command

c) quad() command

d) diff() command

View Answer

Explanation: The case for the capacitor has an initial condition. So the int() command won’t merely give the voltage, as a function of time, for the capacitor. We need to use the ode45 solver or the ode23 solver. The quad command won’t also give the true solution for a voltage since it doesn’t return the complementary function.

6. The accuracy of quad() is ___________

a) very low

b) low

c) moderate

d) high

View Answer

Explanation: The quad() function is pertinent for low accuracy problems. The quadl() function is more useful for high accuracy problems.

7. Double integration of a function can be done by using the _____ command.

a) int(int(func))

b) int(‘int(‘func’)’)

c) quad(int(func))

d) cannot be done

View Answer

Explanation: A function, as an input to the quad() command, should be within a string argument. The int() command cannot take string arguments. Hence, we can use the command int(int(func)) to find the double integral of a function.

8. How will ∫^{ex}⁄_{x} look like, in MATLAB?

a) Infinite series

b) expint(x)

c) ei(x)

d) Error

View Answer

Explanation: The integration of the given function is stored in MATLAB as ei(x) or exponential integration of x. This yields a solution of an exponentially increasing series. Hence, even though it becomes an infinite series, it will be represented as ei(x) whenever we come across such an integration.

9. The class of the result of an indefinite integration is always _____________

a) Signed

b) Double

c) Array

d) Symbolic

View Answer

Explanation: Since we are doing indefinite integration, the result is not a number. It will contain the particular integral after integrating the function and it will only consist of the independent variable. Hence, it’s class will be symbolic.

10. The quad command cannot do ______________

a) Low accuracy integration

b) Definite integration

c) Any integration

d) Indefinite integration

View Answer

Explanation: The quad command is used to find the integral solution for low accuracy cases. It can only do definite integration. It cannot do any indefinite integration; for that, we need the int() command.

11. The function, as an input to the quad command, is given as _______________

a) Symbolic argument

b) String argument

c) Double argument

d) Rational argument

View Answer

Explanation: The in-built operation of the quad command demands the function to be given input as a string argument. We have to write it within a pair of single inverted commas. We can use the symbolic argument for the int() function while finding the definite or an indefinite integration.

12. The output of int(x^2,1,3) and quad(‘x. ^2,1,3) is ________

a) Same

b) Different

c) Maybe different

d) Error

View Answer

Explanation: The output for int(x^2,1,3) will be 26/3. The output for quad(‘x. ^2’,1,3) is 8.6667. Hence we find that each output will be different. The int command will return a fractional form while the quad command will return a decimal form up to 4 places of decimal, rounded up to the 4

^{th}decimal place.

Output:

For int(x^2,1,3): 26/3

For quad(‘x. ^2’,1,3) : 8.6667

13. The command to get more accurate solution for definite integration is ______________

a) int()

b) quad()

c) quadl()

d) not present in MATLAB

View Answer

Explanation: The quadl() command is used to get a result for definite integration with more accuracy. The quad() command does the job with less accuracy. The int() command returns fraction form and not a decimal form hence we cannot compare accuracy with it.

14. Can we do Vector integration in MATLAB?

a) Yes

b) No

c) In some cases

d) Only single integral

View Answer

Explanation: We can do vector integration in MATLAB. We simply need to integrate the co-efficient of the vector in a certain direction with respect to an independent variable. Henceforth, we can do many applications of Vector Calculus.

15. We cannot find the integrator, made with an OP-amp, response using the quad() command at steady state.

a) True

b) False

View Answer

Explanation: The integrator circuit integrates the input waveform within a given time limit. Hence, to find the response of the integrator, we can use the quad() command since it computes definite integration only. But if we want to find the steady state response, we cannot do it using quad() since it does not compute for an infinite limit. Hence, we have to use the int() command.

**Sanfoundry Global Education & Learning Series – MATLAB.**

To practice all areas of MATLAB, __here is complete set of 1000+ Multiple Choice Questions and Answers__.

**Related Posts:**