freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

matlab編程第三章-閱讀頁

2024-10-14 22:41本頁面
  

【正文】 23/2022 Hangzhou Dianzi University 43 Example — Assigning Letter Grades grade 95 A 95 ≥ grade 86 B 86 ≥ grade 76 C 76 ≥ grade 66 D 66 ≥ grade 0 F Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 44 Solution (a) if grade disp (39。)。The grade is B.39。 elseif grade disp (39。)。The grade is D.39。 else disp (39。)。The grade is A.39。 else if grade disp (39。)。The grade is C.39。 else if grade disp (39。)。The grade is F.39。 end end end end Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 46 Good Programming Practice For branches in which there are many mutually exclusive options, use a single if construct with multiple elseif clauses in preference to nested if constructs. Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 47 The switch Construct Based on the value of a single integer, character, or logical expression. Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 48 s w i t c h (s w i t c h _ e x p r)c a s e ca s e _ e x p r_ 1 ,S t a t e m e n t 1S t a t e m e n t 2 B l o c k 1c a s e ca s e _ e x p r_ 2 ,S t a t e m e n t 1S t a t e m e n t 2 B l o c k 2o t h e rwi s e ,S t a t e m e n t 1S t a t e m e n t 2 B l o c k ne n d???????????????Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 49 many values of the switch_expr sw itc h ( sw itc h _ e x p r )c a se {c a se _ e x p r _ 1 , c a se _ e x p r _ 2 , c a se _ e x p r _ 3 },St a te m e n t 1St a te m e n t 2 B l o c k 1o the r w ise ,St a te m e n t 1St a te m e n t 2 B l o c k ne n d??????????Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 50 ?switch_expr and case_expr1) may be numerical, string values. ?If the switch expression matches more than one case expression, only first one of them will be executed. Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 51 switch (value) case {1, 3, 5, 7, 9}, disp (39。)。The value is even.39。 otherwise, disp (39。)。t r y % Tr y t o di s pl ay a n el em en t i nd ex = i np ut ( 39。 ) 。 a ( 39。 ) = 39。ca t ch % I f we g et h er e an e r r or o cc ur r ed di s p ( [ 39。 i nt 2 str ( i nd ex ) ] ) 。 This function returns a 4element row vector containing [xmin xmax ymin ymax], where xmin, xmax, ymin, ymax are the current limits of the plot. axis ([xmin xmax ymin ymax])。 axis (?on‘)。y = s i n ( x ) 。 title ( 39。 ) 。y 1 = sin ( x ) 。p lot ( x , y 1 , 39。 ) 。p lot ( x , y 2 , 39。 ) 。le gend ( 39。 , 39。 ) 。x = 0 : 0 . 05 : 2 。plot ( x , y 1 ) 。y 2 = exp ( x ) 。Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 68 Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 69 Subplots subplot (m, n, p) : this mand creates m n subplots in current figure, arranged in m rows and n columns, and selects subplot p to receive all current plotting mands. Subplots are numbered from left to right, from top to bottom. If a subplot mand creates a new set of axes that conflicts with a previously existing set, then the older axes are automatically deleted. Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 70 Example figu re ( 1 ) 。x = pi : pi / 20 : pi 。plot ( x , y ) 。 Su bp lo t 1 title 39。s ub pl ot ( 2 , 1 , 2 ) 。y = c os ( x ) 。title ( 39。 ) 。y = exp ( 2 * s i n ( x )) 。 ko 39。 L i n e W i d t h 39。 M a r k e r S i z e 39。 M a r k e r E d g e C o l o r 39。 r 39。 M a r k e r F a c e C o l o r 39。 g 39。 \eta η \leq ≤ \theta θ \geq ≥ \lamda λ \Lamda Λ \neg ≠ \mu μ \propto ∝ Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 79 \nu ν \div 247。 \phi θ \leftrightarrow ? \rho ρ \leftarrow ← \sigma ζ \Sigma Σ \rightarrow → \tau η \uparrow ↑ \omega ω \Omega Ω \downarrow ↓ Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 80 If one of the special escape characters \, {, }, _ or ^ must be printed, precede it by backslash character. String Result \tau_{ind} versus \omega_{\itm} ηind versus ωm \theta varies from 0\circ to 90\circ θ varies from 0o to 90o \bf{B}_{\itS} BS Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 81 Polar Plots polar (theta, r) theta : an array of angles in radians。 V : the volume of the gas in liters (L)。kPa/mol K)。 ?Relational and logic operations。 ?Symbolic debugger. Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 95 Summary of Good Programming Practice 1. Be cautious about testing for equality numeric values — roundoff error. 2. Follow the steps of the program design process. 3. Always indent code blocks in if and switch constructs. Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 96 MATLAB Summary axis subplot figure switch hold try/catch if ischar (a) isempty (a) isinf (a) isnan (a) isnumeric (a) polar
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1