adplus-dvertising
frame-decoration

Question

What is the output of the following code?
cumsum([1,2,3,4,NaN])

a.

1 3 6 10 NaN

b.

NaN

c.

1
3
6
10
NaN

d.

Error

Posted under MATLAB

Answer: (a).1 3 6 10 NaN

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following code?

Similar Questions

Discover Related MCQs

Q. The product of a set of elements is always greater than it’s the cumulative sum.

Q. The function to find the R.M.S value is __________

Q. Which function does cumulative summation of elements?

Q. The sum function will return a NaN if any of the element in the input vector is NaN.

Q. The result of cumsum([1,2,3]) and sum([3,3]) are ____________

Q. What is the default variable while evaluating a transfer function?

Q. What is the default variable while evaluating a Laplace transform?

Q. The default variable in case of solve(‘f(x,y,p,a,l)’) command is __________

Q. What is the default parameter for dsolve() command?

Q. What is the default parameter for the ztrans() command?

Q. The default variable, to which the result of any computation.

Q. Butterworth and Low pass filters use _________

Q. The fir1 command can be used to find _____________

Q. The multiplication of two signal in time domain signifies _______

Q. The window function is used to __________

Q. The butter() command takes in ________

Q. The blackmann(N) command returns a ___________

Q. fft2 returns _________

Q. What is the function of the unwarp command?

Q. The default tolerance of the unwarp() function is ________