Logo

Matlab Questions Set 12:

Quiz Mode

 A sparse identity matrix is generated by the ______ command 

1
2
3
4

Solution:

What is the output of the following Z-transform expression?


ztrans(1,z)

1
2
3
4

Solution:

What would be the output of the following code?

A = [1 1 0 0]
B = [1 2 3 4]
C = A * B

1
2
3
4

Solution:

Plotting the results of plot([0:1:8],[rectpulse(1,9)]') and plot([0:1:8],ones(1,9)) will generate the same graph.

1
2

Solution:

What is the output of the following code?

for i=1:4
for j=1:4
a=5; a=a+5;
end
end

1
2
3
4

Solution:

Before starting a new case, we have to end the previous case without using any statement.

1
2
3
4

Solution:

Evaluate the following expression:

a = 9 / 1 * 5 / 1; b = a * a / a * a; c = sin(30) + 1/2; d = 1 - c; e = a + b * c - d

1
2
3
4

Solution:

What happens if you don't assign the result of an expression that evaluates to a numerical value to a variable in MATLAB?

1
2
3
4

Solution:

A function is not returning values according to desired input values. What should be the correction?

1
2
3
4

Solution:

What will be the output of the following MATLAB code?

close all;
for x = 1.5 : 0.5 : 2;
y = 3;
x = y + 3;
clc;
end

1
2
3
4

Solution: