What would the following codes return in MATLAB 1 51 5 2 03
What would the following codes return in MATLAB?
1) 5.1 >= 5
2) 0==3.1*10^-15
Please explain as much as possible;) Thanks
Solution
1) 5.1 >=5 ; it will return 1 which represents true i.e the following condition is true.
2) 0==3.1*10^-15 ; it will return 0 which represents false i.e the following condition is false
MATLAB returns 1 for true and 0 for false as return values for all relational operation
