What is the output of the following code? [code]NaN==Inf[/code]

What is the output of the following code?
Code:
NaN==Inf
A. 0
B. 1
C. Nan
D. Inf
 
Answer: a
Explanation: Nan and Inf are two symbolic variables in MATLAB suggesting ‘Not a number’ and ‘Infinity’ respectively. These are not equal to each other and hence we will get a logical 0 when we enter this in MATLAB.
 

Tìm kiếm

Back
Top