This question is closed. Reopen it to edit or answer.
What am I doing wrong in my code? Trying to detect if array has NaN.
1 view (last 30 days)
So this is my code:
x = [ NaN NaN 24 ]
So I have this code. What I want it to do is to see if there are any NaN's in the vector. If there is an NaN then we make A be 2. If there isn't then A is just the the minimum number of x which is essentially 24.
But when I execute the program it keeps saying A=24 when it should be NaN. Any help would be greaty appreciated.