This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Simulation – 1”.
1. What is the output of the following code?
b) Opens a window for Simulink
c) Closes MATLAB
d) Opens simlink and closes MATLAB
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.
2. What does the following block do?
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
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?
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
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.
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.
Explanation: This block is essential for analysis using circuits. Without it, the simulation won’t start in the Simulink model.
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?
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
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.
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.
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.
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?
a) Left upper corner block
b) Right upper corner block
c) Left bottom corner block
d) Right bottom corner block
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?
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
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.
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.
Explanation: We can simulate the characteristics of a circuit in MATLAB. This means we can calculate the total response of a system in SIMULINK.
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.