clcdisplay('code executing');for number=1:0.1:15 if number == 13.2 disp('Hello'); end end
MATLAB: Didn’t I get “Hello” word by running following script? if I change the value in if loop except 13.2 it gives me correct answer.
hellomaterrorMATLAB
Related Question
- Is this Matlab bug or error? anyone who can help
- Bucle doesn’t end
- How to subtract two close numbers
- Matlab (R2015a) seems to be computing wrongly a simple recurrent sum. Below is a simple code that shows it. I get that Answer=’no’, AnResp=’yes’ however t4(401)=0.012. Does anyone have an idea of what is going on here
- Find same pair values from two variables
- Isempty in while loop not working
- Very simple ‘if’ statement with == operator not working
Best Answer