TA的每日心情 | 开心 2019-11-20 15:05 |
|---|
签到天数: 2 天 [LV.1]初来乍到
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
MIT6_094IAP10_lec02/ p1 |9 b% F% b3 j- n! G) ^7 a; M
8 U* |0 t3 c! c) u! ~1 f% A2 W! z• How long did it take to do required problems?
- f# {( F3 I* Q2 ~+ y4 a, Z• Did anyone do optional problems?
$ B5 e0 g' K6 T! o+ J0 X9 `• Was level of guidance appropriate?
; p: ^2 E# z2 \" L& \/ D# K• Unanswered Questions?
6 I! _ X; P' q4 l( l' U9 O* P, F• Some things that came up:
( T/ h, \0 `7 d" @• Use of semicolon – never required if one command per line. & @9 Z2 P8 K3 V
You can also put multiple commands on one line; in this case a semicolon is necessary to separate commands:5 A# e, p4 p! `# b# d) y+ o0 q3 F
» x=1:10; y=(x-5).^2; plot(x,y);
, }& Z4 ~2 N/ M" M3 F( N• Assignment using indices – remember that you can index into matrices to either look up values or to assign value:
, c9 ?2 ]5 ] G» x=rand(50,1); inds=find(x<0.1); y=x(inds); - C( b! O+ t) Q% p
x(inds)=-x(inds); x(inds)=3;
3 ]# [* m/ n3 R# m
& u' y- E6 D, X/ }* T5 y% {
2 M; T0 N- Q* o y7 l9 @: }) z3 N8 L! M4 I
|
|