1.

What does the function all() do?(a) Returns 1 if all elements within it are 0(b) Returns 0 if all elements within it are 0(c) Returns 0 if all elements within it are non-zero(d) Returns 1 if all elements within it are non-zeroThe question was asked in quiz.The query is from Logical Expressions topic in section MATLAB Programming of MATLAB

Answer»

Right choice is (d) RETURNS 1 if all elements WITHIN it are non-zero

Easiest explanation: The all() function is inbuilt in MATLAB. If we give a VECTOR INPUT to our function, it will return a 1 if all the elements of the vector are non-zero.



Discussion

No Comment Found

Related InterviewSolutions