Using Logical operators in boundary condition

I am working on 2-d problem so i divided the domain in nodes 5*5 matrix.Nodes are increasing in vertical direction.So i want to put two different type of boundary condition.First is on Right and left side and second is on top and bottom. So i am using if loop, at nodes 1,5,20,25 they are having both boundary condition so i am getting error can you tell how to solve this with logical operators (i am not able to use OR operator)

3 Comments

An example or a code sample would be very useful. Your question is so generic and vague that it's impossible to answer.
Also, an explanation why you can't use OR (which is a logical operator!) would be useful.
Well with no code and context it is hard to tell what you are trying to do, but you can achieve the effect of an OR operator by combining NAND operators.
Also, because you have not read this link, you forgot to attach the actual error message, preventing any of us without the Crystal Ball Toolbox from seeing it and being able to give possible causes. Please copy ALL THE RED TEXT.

Sign in to comment.

Answers (0)

Asked:

on 19 Aug 2016

Commented:

on 19 Aug 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!