TA的每日心情 | 开心 2019-11-20 15:05 |
---|
签到天数: 2 天 [LV.1]初来乍到
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
MIT6_094IAP10_lec02
1 w7 w$ T6 c3 J+ K7 p# }) H
* g5 q+ U& a5 l; c7 K• How long did it take to do required problems?: `" l* p! v, v1 M- y
• Did anyone do optional problems?
! C" a# ~$ X0 ` W$ W• Was level of guidance appropriate?
8 _( f) T4 X# }$ ]$ q6 C, a• Unanswered Questions?; W% U) D! ^0 R" _
• Some things that came up:
4 p9 i& K3 X n; @+ k y$ y- p• Use of semicolon – never required if one command per line.
7 U! ^3 ~- d# {# j I, G5 \You can also put multiple commands on one line; in this case a semicolon is necessary to separate commands:& O' U: i; U% t+ Y) {, V
» x=1:10; y=(x-5).^2; plot(x,y);3 C: I; ~2 l- H
• Assignment using indices – remember that you can index into matrices to either look up values or to assign value:
+ g: z$ ^- V& X j» x=rand(50,1); inds=find(x<0.1); y=x(inds); ! S7 x4 y; R3 c/ n6 K' I$ T
x(inds)=-x(inds); x(inds)=3;
" [5 l0 x$ M2 t7 s' W' e6 v
! G9 J' W# Q* I7 M! H5 I& Z* J& p# E6 s8 X
6 i# R2 G! }3 V- u5 E9 g$ e+ F
|
|