Logo

Matlab Questions Set 44:

Quiz Mode

What is the output of the following MATLAB code?

isvector([]);

1
2
3
4

Solution:

 If the result of our summation is Infinity, what will MATLAB show 

1
2
3
4

Solution:

Find the value of a(1,1) given the following MATLAB code:

X = [1 2;3 4];

Y = [3 4;5 6];

a = (X.\Y);

1
2
3
4

Solution:

 In the following code, what is the fundamental frequency of the sawtooth command? 

f=1/50; sawtooth(2*pi*1/f*t)

1
2
3
4

Solution:

  The randn command generates random numbers by following a 

1
2
3
4

Solution:

What will be the output for the below block of code? 

 

P=[1 3 2]; r=roots(P);

1
2
3
4

Solution:

What is the output of the following code?

function k = find_out(n)

k = k + 1;

while isprime(k) == false

       k = k + 1;

end

end

Determine the output for find_out(41).

1
2
3
4

Solution:

The dbquit command, if placed in an M-file, will ________

1
2
3
4

Solution:

  Checking the linearity of a system, the first thing we need to check is whether the system is 

1
2
3
4

Solution:

What is the output of the following MATLAB code?

t=linspace(0,10);fzero(inline('t+t2'), 5);

1
2
3
4

Solution: