>> h = [false, true, false; true, false, true; false, true, false;]
h =
0 1 0
1 0 1
0 1 0
>> h = logical( [false, true, false; true, false, true; false, true, false;])
h =
0 1 0
1 0 1
0 1 0
>> class(h)
ans =
logical
>> h = [false, true, false; true, false, true; false, true, false;]
h =
0 1 0
1 0 1
0 1 0
>> class(h)
ans =
logical
>> class(a)
ans =
double
>> class(b)
ans =
double
>> j = logical(a)
j =
1 1 1
1 1 1
1 1 1
>> a
a =
8 1 6
3 5 7
4 9 2
>> a= randn(2,2)
a =
1.4090 0.6715
1.4172 -1.2075
>> a= randn(4,4)
a =
0.7172 0.7269 0.8884 -2.9443
1.6302 -0.3034 -1.1471 1.4384
0.4889 0.2939 -1.0689 0.3252
1.0347 -0.7873 -0.8095 -0.7549
>> a= rand(4,4)
a =
0.9502 0.7655 0.4456 0.2760
0.0344 0.7952 0.6463 0.6797
0.4387 0.1869 0.7094 0.6551
0.3816 0.4898 0.7547 0.1626
>> a= randn(4,4)
a =
-1.1135 0.3714 0.0326 0.0859
-0.0068 -0.2256 0.5525 -1.4916
1.5326 1.1174 1.1006 -0.7423
-0.7697 -1.0891 1.5442 -1.0616
>> j = logical(a)
j =
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
h =
0 1 0
1 0 1
0 1 0
>> h = logical( [false, true, false; true, false, true; false, true, false;])
h =
0 1 0
1 0 1
0 1 0
>> class(h)
ans =
logical
>> h = [false, true, false; true, false, true; false, true, false;]
h =
0 1 0
1 0 1
0 1 0
>> class(h)
ans =
logical
>> class(a)
ans =
double
>> class(b)
ans =
double
>> j = logical(a)
j =
1 1 1
1 1 1
1 1 1
>> a
a =
8 1 6
3 5 7
4 9 2
>> a= randn(2,2)
a =
1.4090 0.6715
1.4172 -1.2075
>> a= randn(4,4)
a =
0.7172 0.7269 0.8884 -2.9443
1.6302 -0.3034 -1.1471 1.4384
0.4889 0.2939 -1.0689 0.3252
1.0347 -0.7873 -0.8095 -0.7549
>> a= rand(4,4)
a =
0.9502 0.7655 0.4456 0.2760
0.0344 0.7952 0.6463 0.6797
0.4387 0.1869 0.7094 0.6551
0.3816 0.4898 0.7547 0.1626
>> a= randn(4,4)
a =
-1.1135 0.3714 0.0326 0.0859
-0.0068 -0.2256 0.5525 -1.4916
1.5326 1.1174 1.1006 -0.7423
-0.7697 -1.0891 1.5442 -1.0616
>> j = logical(a)
j =
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
No comments:
Post a Comment