TA的每日心情 | 开心 2019-11-20 15:05 |
|---|
签到天数: 2 天 [LV.1]初来乍到
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
MIT6_094IAP10_lec02
$ Y. y" J9 u" b2 h/ V) F, y; D/ J4 W& o! C2 [* Z% U0 h
• How long did it take to do required problems?, X9 H/ E4 I& i
• Did anyone do optional problems?" ^ p% r) r) q
• Was level of guidance appropriate?
E$ G) ^& S8 J1 T* D- c# Y• Unanswered Questions?
0 t% S: u3 G0 r0 o• Some things that came up:8 d( T9 @1 ^- ~
• Use of semicolon – never required if one command per line. 5 @# [, q7 v# ~4 A- d" L2 i9 m
You can also put multiple commands on one line; in this case a semicolon is necessary to separate commands:, v, }" _" s" Q; K$ a
» x=1:10; y=(x-5).^2; plot(x,y);# V6 o# o: r$ S' U+ Y
• Assignment using indices – remember that you can index into matrices to either look up values or to assign value:
& `% ?7 X' ~) V# p, b» x=rand(50,1); inds=find(x<0.1); y=x(inds); U$ z0 K+ S: Y7 {, z' ^3 }. v7 `) F
x(inds)=-x(inds); x(inds)=3;0 U0 y: G; w' l
. C9 }! k, ^- M; g4 F8 r/ v: \$ g/ m
8 y6 S- v6 K" n h
|
|