forked from fengdu78/Coursera-ML-AndrewNg-Notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5 - 3 - Computing on Data (13 min).srt
1886 lines (1509 loc) · 32.8 KB
/
5 - 3 - Computing on Data (13 min).srt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1
00:00:00,220 --> 00:00:01,128
Now that you know how to load
现在 你已经学会了在Octave中
(字幕整理:中国海洋大学 黄海广,[email protected] )
2
00:00:01,128 --> 00:00:03,062
and save data in Octave, put
如何加载或存储数据
3
00:00:03,062 --> 00:00:04,743
your data into matrices and so
如何把数据存入矩阵 等等
4
00:00:04,743 --> 00:00:06,301
on. In this video I'd like
在这段视频中
5
00:00:06,301 --> 00:00:08,252
to show you how to do computational
我将向你介绍
6
00:00:08,252 --> 00:00:10,343
operations on data and
如何对数据进行运算
7
00:00:10,343 --> 00:00:12,296
later on we'll be using this
稍后我们将使用这些
8
00:00:12,320 --> 00:00:16,860
sorts of computation operations to implement our learning algorithms.
运算操作来实现我们的学习算法
9
00:00:16,860 --> 00:00:19,360
Let's get started.
现在我们开始吧
10
00:00:19,610 --> 00:00:21,031
Here's my Octave window.
这是我的 Octave 窗口
11
00:00:21,031 --> 00:00:22,737
Let me just quickly initialize some
我现在快速地
12
00:00:22,737 --> 00:00:24,939
variables to use
初始化一些变量
13
00:00:24,940 --> 00:00:26,679
for examples and set A
比如设置A
14
00:00:26,679 --> 00:00:29,185
to be a 3 by 2 matrix.
为一个3×2的矩阵
15
00:00:29,820 --> 00:00:31,495
and set B to a
设置B为
16
00:00:31,510 --> 00:00:33,319
3 by 2 matrix and let's
一个3 × 2矩阵
17
00:00:33,330 --> 00:00:35,106
set C to a
设置C为
18
00:00:35,120 --> 00:00:38,419
2 by 2 matrix, like so.
2 × 2矩阵
19
00:00:39,150 --> 00:00:41,948
Now, let's say I want to multiply 2 of my matrices.
现在 我想算两个矩阵的乘积
20
00:00:41,960 --> 00:00:44,121
So, let's say I wanna compute AxC.
比如说 A × C
21
00:00:44,121 --> 00:00:45,713
I just type AxC.
我只需键入A×C
22
00:00:45,740 --> 00:00:48,848
So, it's a 3 by 2 matrix times a 2 by 2 matrix.
这是一个 3×2 矩阵乘以 2×2 矩阵
23
00:00:48,860 --> 00:00:52,135
This gives me this 3 by 2 matrix.
得到这样一个3×2矩阵
24
00:00:52,160 --> 00:00:53,736
You can also do elements wise
你也可以对每一个元素
25
00:00:53,740 --> 00:00:56,472
operations and do A.xB
做运算 方法是做点乘运算A .*B
26
00:00:56,500 --> 00:00:57,615
and what this would do is
这么做
27
00:00:57,615 --> 00:00:59,138
they'll take each elements of A
Octave将矩阵 A 中的每一个元素
28
00:00:59,138 --> 00:01:00,584
and multiply it by
与矩阵 B 中的
29
00:01:00,590 --> 00:01:02,558
the corresponding elements of B.
对应元素相乘
30
00:01:02,560 --> 00:01:06,390
So, that's A, that's B, that's A.xB.
这是A 这是B 这是A .* B
31
00:01:06,700 --> 00:01:09,412
So, for example, the first element
比如说 这里第一个元素
32
00:01:09,420 --> 00:01:10,940
gives 1 times 11 which gives 11.
1乘以11得到11
33
00:01:10,950 --> 00:01:14,045
The second element gives
第二个元素是
34
00:01:14,045 --> 00:01:16,752
2 x 12 which gives 24 and so on.
2乘以12得到24
35
00:01:16,760 --> 00:01:18,196
So it is the element
这就是两个矩阵的
36
00:01:18,196 --> 00:01:19,673
wise multiplication of two
元素位运算
37
00:01:19,673 --> 00:01:21,500
matrices, and in general
通常来说
38
00:01:21,520 --> 00:01:23,359
the P rand tends to,
在Octave中
39
00:01:23,380 --> 00:01:25,132
it's usually used, to denote
点号一般
40
00:01:25,132 --> 00:01:27,435
element wise operations in octave.
用来表示元素位运算
41
00:01:27,435 --> 00:01:28,882
So, here's a matrix
这里是一个矩阵A
42
00:01:28,882 --> 00:01:31,735
A and I'll do A dot carry 2.
这里我输入A .^ 2
43
00:01:31,735 --> 00:01:33,001
This gives me the multi,
这将对矩阵A中
44
00:01:33,010 --> 00:01:35,671
the element wise squaring of
每一个元素平方
45
00:01:35,690 --> 00:01:37,411
A, so 1 squared
所以 1的平方是1
46
00:01:37,411 --> 00:01:40,813
is 1, 2 squared is 4 and so on.
2的平方是4 等等
47
00:01:40,870 --> 00:01:42,215
Let's set V to a vector,
我们设V是一个向量
48
00:01:42,260 --> 00:01:46,085
we'll set V as 123 as a column vector.
设V为 [1; 2; 3] 是列向量
49
00:01:46,180 --> 00:01:47,848
You can also do 1.
你也可以输入
50
00:01:47,860 --> 00:01:49,675
over V to do
1 ./ V
51
00:01:49,675 --> 00:01:51,533
the element wise reciprocal of
得到每一个元素的倒数
52
00:01:51,533 --> 00:01:53,176
V so this gives me
所以这样一来
53
00:01:53,210 --> 00:01:55,600
one over one, one over two and one over three.
就会分别算出 1/1 1/2 1/3
54
00:01:55,600 --> 00:01:56,898
This works too for matrices so
矩阵也可以这样操作
55
00:01:56,898 --> 00:01:58,436
one dot over A, gives me
1 ./ A 得到
56
00:01:58,470 --> 00:02:00,464
that element wise inverse of
A中每一个元素的倒数
57
00:02:00,520 --> 00:02:03,342
A. and once
同样地
58
00:02:03,342 --> 00:02:04,813
again the P radians gives use
这里的点号
59
00:02:04,830 --> 00:02:08,193
a clue that this is an elements wise operation.
还是表示对每一个元素进行操作
60
00:02:08,193 --> 00:02:09,663
To also do things like log
我们还可以进行求对数运算
61
00:02:09,663 --> 00:02:11,591
V This is an element wise
也就是对每个元素
62
00:02:11,600 --> 00:02:14,257
logarithm of, the
进行求对数运算
63
00:02:14,257 --> 00:02:15,418
V, E to the
还有自然数e的幂次运算
64
00:02:15,420 --> 00:02:17,394
V, is the base E
就是以e为底
65
00:02:17,394 --> 00:02:20,288
exponentiation of these elements
以这些元素为幂的运算
66
00:02:20,330 --> 00:02:21,432
of this is E, this is E
所以这是e 这是e的平方
67
00:02:21,432 --> 00:02:23,105
squared EQ, this is
这是e的立方
68
00:02:23,105 --> 00:02:26,010
V. And I
v 矩阵是这样的
69
00:02:26,120 --> 00:02:28,187
can also do apps V to
我还可以用 abs
70
00:02:28,230 --> 00:02:30,172
take the element wise absolute
来对 v 的每一个元素
71
00:02:30,172 --> 00:02:32,056
value of V. So here,
求绝对值
72
00:02:32,056 --> 00:02:34,418
V was all positive, abs, say
当然这里 v 都是正数
73
00:02:34,430 --> 00:02:36,503
minus 1 to minus 3,
我们换成另一个
74
00:02:36,503 --> 00:02:38,543
the element wise Absolute
这样对每个元素求绝对值
75
00:02:38,543 --> 00:02:40,428
value gives me back these
得到的结果就是
76
00:02:40,430 --> 00:02:43,929
non-negative values and negative
这些非负的元素
77
00:02:43,929 --> 00:02:45,465
V gives me the minus
还有 -v
78
00:02:45,465 --> 00:02:46,715
of V. This is the same
给出V中每个元素的相反数
79
00:02:46,730 --> 00:02:49,085
as -1xV but usually
这等价于 -1 乘以 v
80
00:02:49,085 --> 00:02:50,653
you just write negative V and
不过一般就直接用 -v 就好了
81
00:02:50,653 --> 00:02:55,340
so that negative 1xV and what else can you do?
其实就等于 -1*v
82
00:02:55,990 --> 00:02:57,185
Here's another neat trick.
还有什么呢?
83
00:02:57,185 --> 00:02:58,343
So Let's see.
还有一个技巧
84
00:02:58,343 --> 00:03:01,424
Let's say I want to take V and increment each of these elements by 1.
比如说 我们想对v中的每个元素都加1
85
00:03:01,424 --> 00:03:02,520
Well, one way to do
那么我们可以这么做
86
00:03:02,520 --> 00:03:05,407
it is by constructing a
首先构造一个
87
00:03:05,420 --> 00:03:09,010
3 by 1 vector
3行1列的1向量
88
00:03:09,660 --> 00:03:12,666
this all ones and adding that to V. So, they do that.
然后把这个1向量跟原来的向量相加
89
00:03:12,666 --> 00:03:15,373
This increments V by for 123 to 234.
因此 v 向量从[1 2 3] 增至 [2 3 4]
90
00:03:15,373 --> 00:03:16,804
The way I did
我用了一个
91
00:03:16,804 --> 00:03:21,439
that was length of V, is three.
length(v) 命令
92
00:03:21,890 --> 00:03:23,790
So ones, length of
因此这样一来
93
00:03:23,790 --> 00:03:25,792
V by one, this is ones
ones(length(v) ,1) 就相当于
94
00:03:25,820 --> 00:03:27,055
of three by one.
ones(3,1)
95
00:03:27,055 --> 00:03:29,525
So that's ones, three by one.
所以这是ones(3,1)
96
00:03:29,580 --> 00:03:31,150
On the right and what I
对吧 然后我做的是
97
00:03:31,230 --> 00:03:33,198
did was B plus ones,
v + ones(3,1)
98
00:03:33,198 --> 00:03:35,139
V by one, which is adding
也就是将 v 的各元素
99
00:03:35,150 --> 00:03:36,605
this vector of all ones
都加上这些1
100
00:03:36,610 --> 00:03:38,112
to B. And so this increments
这样就将 v 的每个元素
101
00:03:38,112 --> 00:03:40,340
V by one.
增加了1
102
00:03:40,340 --> 00:03:41,984
And you, another simpler
另一种更简单的方法是
103
00:03:41,984 --> 00:03:44,472
way to do that is to type V+ one, right?
直接用 v+1
104
00:03:44,472 --> 00:03:45,600
So that's V and
所以这是 v
105
00:03:45,650 --> 00:03:46,989
V+ one also means to
v + 1 也就等于
106
00:03:47,000 --> 00:03:49,257
add one element wise to
把 v 中的每一个元素
107
00:03:49,280 --> 00:03:52,458
each of my elements of V.
都加上1
108
00:03:52,458 --> 00:03:55,422
Now, let's talk about more operations.
现在 让我们来谈谈更多的操作
109
00:03:55,450 --> 00:03:58,848
So, here's my matrix A. If you want to write A transpose.
这是我的矩阵A 如果你想要求它的转置
110
00:03:58,848 --> 00:04:00,841
The way to do that is to write A prime.
那么方法是用A‘
111
00:04:00,900 --> 00:04:02,653
That's the apostrophe symbol.
这是单引号符号
112
00:04:02,660 --> 00:04:03,770
It's the left quote.
并且是左引号
113
00:04:03,770 --> 00:04:05,355
So, on your keyboard
可能你的键盘上
114
00:04:05,355 --> 00:04:06,975
you probably have a left
有一个左引号
115
00:04:06,975 --> 00:04:08,106
quote and a right quote.
和一个右引号
116
00:04:08,106 --> 00:04:09,901
So this is a at the
这里用的是左引号
117
00:04:09,950 --> 00:04:12,304
standard quotation mark is a,
也就是标准的引号
118
00:04:12,304 --> 00:04:14,765
what to say, a transpose
因此 A’
119
00:04:14,765 --> 00:04:16,172
to excuse me the, you
将得出 A 的转置矩阵
120
00:04:16,172 --> 00:04:17,228
know, a transpose of my
当然
121
00:04:17,228 --> 00:04:18,919
major and of course
如果我写 (A‘)’
122
00:04:18,919 --> 00:04:20,405
a transpose if I transpose
也就是 A 转置两次
123
00:04:20,405 --> 00:04:21,650
that again then I should
那么我又重新得到矩阵 A
124
00:04:21,650 --> 00:04:26,509
get back my matrix A. Some more useful functions.
还有一些有用的函数
125
00:04:26,540 --> 00:04:28,646
Let's say locate A is
假如说 小写a
126
00:04:28,646 --> 00:04:30,546
1 15 to 0.5.
是[1 15 2 0.5]
127
00:04:30,546 --> 00:04:34,266
So, it's a, you know, 1 by 4 matrix.
这是一个1行4列矩阵
128
00:04:34,266 --> 00:04:36,239
Let's say set val equals max
假如说 val=max(a)
129
00:04:36,239 --> 00:04:37,833
of A. This returns the
这将返回
130
00:04:37,833 --> 00:04:39,328
maximum value of A, which
A矩阵中的最大值
131
00:04:39,328 --> 00:04:41,481
in this case is 15 and
在这里是15
132
00:04:41,500 --> 00:04:44,465
I can do val ind max
我还可以写 [val, ind] = max(a)
133
00:04:44,490 --> 00:04:47,115
A. And this returns
这将返回
134
00:04:47,120 --> 00:04:49,634
val of int which are
a矩阵中的最大值
135
00:04:49,634 --> 00:04:51,289
the maximum value of A
存入val
136
00:04:51,289 --> 00:04:52,943
which is 15 as was the index.
以及该值对应的索引
137
00:04:52,943 --> 00:04:56,028
So the elements number two of A that 15.
因此元素15对应的索引值为2 存入ind
138
00:04:56,028 --> 00:04:58,766
So, in is my index into this.
所以 ind 等于2
139
00:04:58,766 --> 00:05:00,148
Just as a warning: if
特别注意一下
140
00:05:00,148 --> 00:05:03,155
you do max A where A is a matrix.
如果你用命令 max(A) A是一个矩阵的话
141
00:05:03,180 --> 00:05:04,746
What this does is this actually
这样做就是对每一列
142
00:05:04,780 --> 00:05:07,848
does the column wise maximum,
求最大值
143
00:05:07,860 --> 00:05:11,525
but say a little bit more about this in a second.
等下再仔细讲讲
144
00:05:11,570 --> 00:05:13,305
So, using this example of the
我们还是用这个例子
145
00:05:13,305 --> 00:05:17,008
variable lowercase A. If I do A less than three.
这个 小a 矩阵
146
00:05:17,040 --> 00:05:19,548
This does the element wise operation.
如果输入 a<3
147
00:05:19,590 --> 00:05:21,063
Element wise comparison.
这将进行逐元素的运算
148
00:05:21,063 --> 00:05:22,624
So, the first element
所以 第一个元素
149
00:05:22,624 --> 00:05:24,855
Of A is less than three equals to one.
是小于3的 因此返回1
150
00:05:24,855 --> 00:05:26,315
Second elements of A is
a的第二个元素
151
00:05:26,315 --> 00:05:27,435
not less than three, so
不小于3 所以
152
00:05:27,435 --> 00:05:29,948
this value is zero, because it is also.
这个值是0 表示"非"
153
00:05:29,950 --> 00:05:31,258
The third and fourth numbers of
第三个和第四个数字
154
00:05:31,300 --> 00:05:32,866
A are the lesson,
仍然是小于3
155
00:05:32,870 --> 00:05:35,667
I meant less than three, third and fourth elements are less than three.
2和0.5都小于3
156
00:05:35,667 --> 00:05:36,826
So this is one, one, so
因此 这返回[1 1 0 1]
157
00:05:36,826 --> 00:05:38,441
this is just the element wide
也就是说
158
00:05:38,460 --> 00:05:40,241
comparison of all four
对a矩阵的每一个元素
159
00:05:40,280 --> 00:05:42,504
element variable lower case
与3进行比较
160
00:05:42,520 --> 00:05:44,008
three and it returns true
然后根据每一个元素与3的大小关系
161
00:05:44,020 --> 00:05:47,382
or false depending on whether or not it's less than three.
返回1和0表示真与假
162
00:05:47,400 --> 00:05:48,843
Now, if I do find
现在 如果我写 find(a<3)
163
00:05:48,880 --> 00:05:50,708
A less than three, this would
这将告诉我
164
00:05:50,710 --> 00:05:52,149
tell me which are the
a 中的哪些元素
165
00:05:52,190 --> 00:05:53,805
elements of A that the
是小于3的
166
00:05:53,860 --> 00:05:55,202
variable A of less than three
是小于3的
167
00:05:55,202 --> 00:05:56,964
and in this case the 1st, 3rd
在这里就是第一 第三和第四个元素
168
00:05:56,964 --> 00:06:00,244
and 4th elements are lesson three.
是小于3的
169
00:06:00,244 --> 00:06:01,465
For my next example Oh, let
下一个例子
170
00:06:01,465 --> 00:06:03,335
me set eight be code to
设A = magic(3)
171
00:06:03,340 --> 00:06:05,765
magic three. The magic
magic 函数返回什么呢
172
00:06:05,765 --> 00:06:07,409
function returns. Let's type help magic. Functions called
让我们查看 magic 函数的帮助文件
173
00:06:09,390 --> 00:06:12,581
The magic function returns.
magic 函数将返回
174
00:06:12,581 --> 00:06:15,362
Returns this matrices called magic squares.
一个矩阵 称为魔方阵或幻方 (magic squares)
175
00:06:15,362 --> 00:06:17,722
They have this, you know,
它们具有以下
176
00:06:17,740 --> 00:06:20,012
mathematical property that all
这样的数学性质
177
00:06:20,030 --> 00:06:21,590
of their rows and columns and
它们所有的行和列和对角线
178
00:06:21,590 --> 00:06:23,730
diagonals sum up to the same thing.
加起来都等于相同的值
179
00:06:23,730 --> 00:06:25,535
So, you know, it's
当然据我所知
180
00:06:25,580 --> 00:06:27,378
not actually useful for machine
这在机器学习里
181
00:06:27,378 --> 00:06:28,385
learning as far as I
基本用不上
182
00:06:28,385 --> 00:06:29,688
know, but I'm just using
但我可以用这个方法
183
00:06:29,688 --> 00:06:31,720
this as a convenient way,
很方便地生成一个
184
00:06:31,720 --> 00:06:33,058
you know, to generate a 3
3行3列的矩阵
185
00:06:33,058 --> 00:06:36,206
by 3 matrix and this magic square screen.
而这个魔方矩阵这神奇的方形屏幕。
186
00:06:36,220 --> 00:06:37,228
We have the power of 3
每一行 每一列
187
00:06:37,228 --> 00:06:39,500
at each row, each column and
每一个对角线
188
00:06:39,510 --> 00:06:41,055
the diagonals all add up
三个数字加起来
189
00:06:41,055 --> 00:06:44,487
to the same thing, so it's kind of a mathematical construct.
都是等于同一个数
190
00:06:44,510 --> 00:06:45,789
I use magic, I use this
我只有在演示功能
191
00:06:45,800 --> 00:06:47,110
magic function only when I'm
或者上课教 Octave 的时候
192
00:06:47,110 --> 00:06:48,118
doing demos, or when I'm
会用到这个矩阵
193
00:06:48,140 --> 00:06:49,571
teaching Octave like this and
在其他有用的机器学习应用中
194
00:06:49,580 --> 00:06:51,103
I don't actually use it for
这个矩阵其实没多大作用
195
00:06:51,103 --> 00:06:53,846
any, you know, useful machine learning application.
让我来看看别的
196
00:06:53,860 --> 00:06:59,356
But, let's see, if I type RC equals find A greater than or equals 7.
如果我输入 [r,c] = find( A>=7 )
197
00:06:59,390 --> 00:07:02,657
This finds all the elements
这将找出所有A矩阵中
198
00:07:02,657 --> 00:07:03,797
of a that are greater than
大于等于7的元素
199
00:07:03,797 --> 00:07:05,246
and equals to 7 and
因此
200
00:07:05,246 --> 00:07:07,044
so, RC sense a row and column.
r 和 c 分别表示行和列