What will be the output of the following code? [code]all([Nan])[/code]

Quốc Ân

New member
What will be the output of the following code?
Code:
all([Nan])
A. 1
B. 0
C. Error
D. Nan
 
Answer: c
Explanation: Nan is not defined in MATLAB. It should have been ‘NaN’ or ‘nan’. If it was either of them, the result would’ve been 1 since NaN is not equal to 0.
 

Tìm kiếm

Back
Top