TA的每日心情 | 开心 2019-11-20 15:05 |
---|
签到天数: 2 天 [LV.1]初来乍到
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
MIT6_094IAP10_lec02% ?" w% b- D! w
# n$ L ?9 i" Q6 c( D" U
• How long did it take to do required problems?
) N: C- ^ X; a4 Y" i# @1 ?- |• Did anyone do optional problems?: b, F% J" ]; D7 ^
• Was level of guidance appropriate?2 O& c* y* F- H6 Y5 _
• Unanswered Questions?" j+ q8 n! n$ A7 B: F. u& i' L
• Some things that came up:
" Y( o/ k! U6 t, I• Use of semicolon – never required if one command per line.
0 B: _! _+ S$ {6 `. ^* |: }8 P/ ~+ H$ [You can also put multiple commands on one line; in this case a semicolon is necessary to separate commands:
: M6 [4 T8 z& L8 x0 I1 z6 o» x=1:10; y=(x-5).^2; plot(x,y);8 I) g u+ T0 n; q
• Assignment using indices – remember that you can index into matrices to either look up values or to assign value:
8 g) Z- q0 z- ]" [0 ^» x=rand(50,1); inds=find(x<0.1); y=x(inds); ( n9 q8 {% J: t& s* ~8 }. f
x(inds)=-x(inds); x(inds)=3;+ P. P; N' b `( w
" ~* I, v2 T; C" Z( g6 e1 o# ~% a& k9 \7 Q+ R: z
9 P4 D4 _% l5 e4 F: w |
|