Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Logicke operacije
- >>true
- aus = 1;
- >>false
- aus = 0;
- primer: >> 3<5 ==>aus = 1
- >> y = [6 3 2 1 6]
- >> y>4 ==> [1 0 0 0 0 1]
- >> z=[1 2 3 3 2 1]
- >> y>z ==> [1 1 0 0 1]
- >>all(y>4) ==> aus=0
- >>all(y>0) ==> aus=1
- >>any(y>6) ==> aus = 0
- A = [1 2 3; 4 5 6; 7 8 6] B = [1 2 3; 4 1 6; 7 7 2]
- >> A==B
- aus [1 1 1
- 1 0 0
- 1 0 0]
- >>all(A==B) ==> aus [1 0 0]
- >>any(A==B) ==> aus = [1 1 1]
- >>all(all(A==B)) aus = 0 <==> isequal(A,B)
- find(y<5) ==> [1 3 4]
- y(find(y<5)) ==> [1 2 3]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement