Mod 4 Commands and Results Utility Matrix
Mod 4 Commands and Results Utility Matrix
y = [0 2 8 7] k=x>y k=x==y
y= k= k=
0 2 8 7 1 1 0 0 0 0 0 1
x<=y k=x~=y
ans = k=
0 0 1 1 1 1 1 0
y = [0 2 8 7] n=x|y p=xor(x,y)
y= n= p=
0 2 8 7 0 1 1 1 0 0 0 0
x= 0 5 3 7 any(x<0) isempty(x)
y= 0 2 8 7 ans = ans =
0 (false) 0 (false)
all(x>=0)
ans =
1 (true=1) any(x>0) c=[inf NaN]
ans = c=
1 (true) Inf NaN
all(x<=0)
ans =
0 (false)
isinf(c) isnan(c) sin(x)
ans = ans = ans =
1 0 0 1 0 -0.9589 0.1411 0.6570
sind(x)
isfinite(c) find(x) ans =
ans = ans = 0 0.0872 0.0523 0.1219
0 0 2 3 4
asind(x)
[r,s]=find(y>0) ans =
isfinite(x) r= (row) 1.0e+02 *
ans = 1 1 1 0.0000 + 0.0000i 0.9000 -
1 1 1 1 s= (col) 1.3135i 0.9000 - 1.0100i
2 3 4 0.9000 - 1.5091i
sinh(x) exp(x) sqrt(x)
ans = ans =
0 74.2032 10.0179 548.3161 1.0e+03 * ans =
0.0010 0.1484 0.0201 0 2.2361 1.7321 2.6458
1.0966
nthroot(x,4)
log(x) ans =
ans = 0 1.4953 1.3161 1.6266
-Inf 1.6094 1.0986
1.9459
abs(x) real(com) conj(com)
ans = com = ans =
0 5 3 7 0 5 3 7 0 5 3 7
x='t.*cos(3*pi*t)'; Z=inline('cos(x)*.cos(y).*exp(-
y='t.*sin(3*pi*t)'; sqrt((x.^2+y.^2)/4)))');
z=’t’;
econtour(Z)
ezplot3(x, y, z)
try at home