Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation of Non-Scalar If-Condition Expression #134

Closed
rdbyk opened this issue Jun 14, 2018 · 1 comment
Closed

Evaluation of Non-Scalar If-Condition Expression #134

rdbyk opened this issue Jun 14, 2018 · 1 comment
Assignees
Milestone

Comments

@rdbyk
Copy link

rdbyk commented Jun 14, 2018

Describe the bug

I am not sure, whether the following is intentional, but I think it is a bug. Only if all elements of a non-scalar if-condition are true, then the then statement should be executed?

--> if [false,false],disp('TRUE'),else,disp('FALSE'),end
FALSE
--> if [true,false],disp('TRUE'),else,disp('FALSE'),end
TRUE % Not OK, should be FALSE
--> if [false,true],disp('TRUE'),else,disp('FALSE'),end
TRUE % Not OK, should be FALSE
--> if [true,true],disp('TRUE'),else,disp('FALSE'),end
TRUE
  • OS: Ubuntu 14.04
  • Version 0.2.5.0
@Nelson-numerical-software
Copy link
Collaborator

it is a bug (I forgot to manage this case)...
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants