MATLAB Questions and Answers – Simulation – 1

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

1. What is the output of the following code?

simlink;

a) Error
b) Opens a window for Simulink
c) Closes MATLAB
d) Opens simlink and closes MATLAB
View Answer

Answer: a
Explanation: There’s an error in the above code. It’s a typical spelling error which is why MATLAB doesn’t recognize the command. A ‘u’ is missing since the actual command is Simulink.
advertisement
advertisement

2. What does the following block do?
Block converting a simulink signal to a physical signal
a) Converts a Simulink signal to a physical Signal
b) Converts a Simulink variable to a physical variable
c) Converts a Simulink operation to a physical operation
d) Does nothing
View Answer

Answer: a
Explanation: The above shown block does the work which converts a simulink signal to a physical signal. This is used to convert a signal from a transfer function toolbox, say, to a physical real signal which can be used for evaluation in circuits.

3. What does the following block do?
The block diagram evaluates circuit parameters of every component during Simulation
a) It evaluates circuit parameters after steady state
b) It evaluates circuit parameters of every component during Simulation
c) It evaluates the equation f(x)=0 for Simulink Signal
d) It does nothing
View Answer

Answer: b
Explanation: It is connected to all separate n/w’s present in the model. It will calculate the parameters of every component present in the circuit, during Simulation, and the model won’t be simulated without this solver.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

4. What is the error in the following model?
The error in the above model is the absence of a HDL coder ground
The error in the above model is the absence of a ___ ground
a) Simulink
b) HDL coder
c) Simscape
d) A.C.
View Answer

Answer: b
Explanation: The ground in Simulink toolbox is not compatible with circuits while the ground in the HDL Coder Toolbox is. The Simscape toolbox doesn’t have a ground. The HDL Coder ground is missing.

5. Is this block necessary for circuit analysis in the SIMULINK model?
The block is essential for analysis using circuits in figure
a) Yes
b) No
c) Only for AC analysis
d) Only for DC analysis
View Answer

Answer: a
Explanation: This block is essential for analysis using circuits. Without it, the simulation won’t start in the Simulink model.
advertisement

6. How can we connect the following blocks?
By converting the signal from the sensor to a Simulink Signal we can connect
a) By a wire
b) By converting the signal from the sensor to a Simulink Signal
c) By a VCCS
d) By a ground
View Answer

Answer: b
Explanation: The signal from the current sensor is treated as a physical sensor to account for the noise, temperature changes in the environment of the circuit. Now, since this is a physical signal- we actually need to convert it to a signal which is compatible with the Simulink environment and this is done by a converter which converts a physical signal to a Simulink signal. Henceforth, we can connect the output of the converter to our scope and watch the output swing.

7. What does this block do?
The block is used to carry a signal from one part of the circuit to another
a) Sends a signal from one part of a circuit to another
b) Sends a signal from one file to another file
c) Sends a signal from source to destination
d) Sends a function from one signal to another
View Answer

Answer: a
Explanation: This block is used to carry a signal from one part of the circuit to another. To exemplify the concept, we may want to see the graphs for the input and output voltage as a stack in the scope. We can connect the input to the scope via the Goto block instead of connecting the input signal through a wire with the scope.
advertisement

8. What type of signals does this block take?
Type of signals block take is designed in MATLAB to multiplex any kind of signal
a) Only real signals
b) Only Complex signals
c) Only digital signals
d) Any signal
View Answer

Answer: d
Explanation: This block has essentially been designed in MATLAB to multiplex any kind of signal. It accepts both real and complex signals so it also takes digital signals.

9. When does the ramp function start in the following block?
The ramp function starts at user specified time
a) At t=0
b) User specified time
c) At t=1
d) Just after t=0
View Answer

Answer: b
Explanation: The ramp function can start from any instant of time. This can be specified by the user while setting the parameters of the block.

10. Which waveform is not produced by the above block?
The waveform is not produced by the above block is Tangent
a) Cosine
b) Tangent
c) Square
d) Sawtooth
View Answer

Answer: b
Explanation: The cosine waveform can be generated by delaying the sinusoidal signal by pi/2. The Square and Sawtooth waveforms are also generated by this block. The signal to represent tan(x) is not available in this block.

11. Which of the following takes a mathematical user-defined function directly?
The mathematical user-defined function directly is Left upper corner block
a) Left upper corner block
b) Right upper corner block
c) Left bottom corner block
d) Right bottom corner block
View Answer

Answer: a
Explanation: The Fcn block allows a user defined function to operate on signals during simulation and directly give a desired mathematical function. The Interpreted MATLAB function block is used to call the MATLAB commands which are pre-defined in MATLAB. The Function Caller block is used to specify a stateflow chart which can be used as a separate function block.

12. What does this block do?
The given block checks whether the input given to this block is 0 or not
a) Checks whether the input signal is non-zero
b) Check whether the output signal is non-zero
c) Checks whether a signal is zero
d) Checks whether we have a ground in the circuit
View Answer

Answer: c
Explanation: The given block checks whether the input given to this block is 0 or not. If it’s 0, the block returns an error.

13. Is the battery voltage dependent on charge?
Charge content of battery & make voltage coming from it as a charge dependent
a) Yes
b) No
c) It can be modelled
d) It cannot be modelled
View Answer

Answer: c
Explanation: We can set the charge content of the battery and thereby make the voltage coming from it as a charge dependent voltage source which is quite nice for real time simulation.

14. Can we simulate transient states in Simulink.
a) True
b) False
View Answer

Answer: a
Explanation: We can simulate the characteristics of a circuit in MATLAB. This means we can calculate the total response of a system in SIMULINK.

15. Does this block take noise into account?
The block is treated as an ideal constant voltage source in given figure
a) Yes
b) No
c) Sometimes
d) Only at high frequencies
View Answer

Answer: b
Explanation: This block is treated as an ideal constant voltage source. It can be used in place of the voltage source already present in Simulink toolbox.

Sanfoundry Global Education & Learning Series – MATLAB.

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.