My Report

MATLAB Practice Test 7


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. What is the output of the following code?

function c = addem(ap,q)
p=nargn-1
switch p
    case 2
        c = ap*q;
    case 1
        c = sin(q)
    otherwise
        c = 0;
end
addem(1,2,3,4,5,6,7,8)

2. The disp() command cannot print anything but inputs given within string arguments.

3. The limits of the graph obtained from the scope can be changed from the ________

4. What is the output of the following code?

[q]=eval(sprintf('23 '))

5. What is the output of the following code?

disp(“12”)

6. Digital systems ______ in Simulink.

7. The following operation results in

Function p= ol(q,varargin)
narginchk(45,NaN)
end

8. What is the output of the following code?

feval[‘round’,123.12]

9. The debug commands can be run in

10. For this block, the early voltage is always infinite.
matlab-questions-answers-modeling-1-q10


 

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.