TA的每日心情 | 开心 2019-11-20 15:05 |
---|
签到天数: 2 天 [LV.1]初来乍到
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
MIT6_094IAP10_lec02
+ V1 i. T9 N' d9 k1 P: W. z3 P# U* b8 p
• How long did it take to do required problems?$ @/ s4 |" `8 B2 z' H! n& Q
• Did anyone do optional problems?* x3 ^6 Q1 a$ f" c. q2 m2 E
• Was level of guidance appropriate?
6 u" u. j# i. Z9 s7 I• Unanswered Questions?
2 G1 U: l, R( W& o9 i+ V0 y• Some things that came up:8 } Z2 E/ i& v+ y* m0 j" i( S
• Use of semicolon – never required if one command per line.
" Y. A' a" @) a% E% cYou can also put multiple commands on one line; in this case a semicolon is necessary to separate commands:
8 X x) I; N! p* N) D+ |/ ]» x=1:10; y=(x-5).^2; plot(x,y);
+ V6 c" |7 D* H6 j# |• Assignment using indices – remember that you can index into matrices to either look up values or to assign value:
+ U( M4 y+ X6 w! t* T» x=rand(50,1); inds=find(x<0.1); y=x(inds);
4 Y7 v8 ?8 J6 j' fx(inds)=-x(inds); x(inds)=3;8 q# ?3 b% m6 O$ a3 V
: I. A( a% K8 u! L5 j" ]5 I
3 r: w( Q# l/ m1 b" b7 ~ }0 E
. V5 d4 b9 y% W! o+ ]5 X' r. K |
|