Determine the values of the following expressions using MATL
Determine the values of the following expressions using MATLab.
(a) 1 & -1
(b) 13 & ~(-6)
(c) 0<-2|0
(d) ~[1 0 2]*3
(e) 0<=0.2<=0.4
(f) 5>4>3
(g) 2>3&1
Solution
(a) 1 & -1
ans = 1
(b) 13 & ~(-6)
ans = 0
(c) 0<-2|0
ans = 0
(d) ~[1 0 2]*3
ans = 0 3 0
(e) 0<=0.2<=0.4
ans = 0
(f) 5>4>3
and = 0 , beacause 5>4 = 1 and 1 > 3 = 0
(g) 2>3&1
ans 0, because 2>3 = 0 and 0 && 1 = 0
![Determine the values of the following expressions using MATLab. (a) 1 & -1 (b) 13 & ~(-6) (c) 0<-2|0 (d) ~[1 0 2]*3 (e) 0<=0.2<=0.4 (f) 5>4& Determine the values of the following expressions using MATLab. (a) 1 & -1 (b) 13 & ~(-6) (c) 0<-2|0 (d) ~[1 0 2]*3 (e) 0<=0.2<=0.4 (f) 5>4&](/WebImages/46/determine-the-values-of-the-following-expressions-using-matl-1144528-1761614775-0.webp)