TA的每日心情 | 开心 2019-11-20 15:05 |
|---|
签到天数: 2 天 [LV.1]初来乍到
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
MIT6_094IAP10_lec02& H0 w" w+ ~3 E- q) v8 r
1 Z" k' d, F5 `1 Y& H; {• How long did it take to do required problems?
9 \- Z. i: |$ y( F0 x! [$ m9 z& g/ N6 b• Did anyone do optional problems?; }4 i0 C# W! p0 B0 z
• Was level of guidance appropriate?
! y6 E2 v6 z1 W+ ?" F8 @• Unanswered Questions?" `9 C5 p6 ?, h7 j
• Some things that came up:
7 t1 w( @. K0 M9 u8 U6 P• Use of semicolon – never required if one command per line. ! y" F6 ]+ y& l
You can also put multiple commands on one line; in this case a semicolon is necessary to separate commands:
6 I% X9 I: V2 D* U4 | f* }% A8 l4 w» x=1:10; y=(x-5).^2; plot(x,y);' c, ^ G H+ b( V6 L
• Assignment using indices – remember that you can index into matrices to either look up values or to assign value:
5 j5 w7 T' u+ w» x=rand(50,1); inds=find(x<0.1); y=x(inds); - f6 D" h2 B ^8 g8 q/ u" F& V$ [# s
x(inds)=-x(inds); x(inds)=3;- ~* v8 f$ ^/ K5 c- Y" z
$ y. o7 R6 b9 E4 Q& P* o
1 b' h4 u' S" q
+ j$ @0 h# x4 h. Q |
|