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

正文內(nèi)容

matlab編程第三章-預(yù)覽頁

2025-10-19 22:41 上一頁面

下一頁面
 

【正文】 /23/2022 Hangzhou Dianzi University 22 MATLAB treats an operand as true if it is any nonzero value, and false if it is zero. ~5 is 0 ?Scalar with array Array with array 1001a??? ????0b? 00amp。 2. Since strings are really arrays of characters, relational operators can only pare two strings if they are of equal lengths Programming Pitfalls Be careful not to confuse the equivalence relational operator (==) with the assignment operator (=). Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 16 Hierarchy: Relational operators are lower than all arithmetic operators. 7 + 3 2 + 11 (7 + 3) (2 + 11) Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 17 A Caution about the == and ~= Operators a = 0。A39。 any nonzero value as true result. Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 12 Relational Operators a1 op a2 a1 and a2 are arithmetic expressions, variables, or strings. Operator Operation = = Equal to ~ = Not equal to Greater than = Greater than or equal to Less than = Less than or equal to Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 13 3 4 3 = 4 3 = = 4 3 4 4 = 4 39。 1 1 0 0 1 1 Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 14 ?Scalar value with array ?Array with array 0b?1021a??? ?????ab?10an s01??? ????1021a??? ?????0221b??? ??????ab??10a ns11??? ????Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 15 1. Both array must have the same size (or shape)。 Logical AND | Logical OR xor Logical Exclusive OR ~ Logical NOT Chapter 3 Branching Statements and Program Design 10/23/2022 Hangzhou Dianzi University 21 Inputs and or xor not l1 l2 l1 amp。 value2 (d) value1 amp。 ?switch。 elseif (b^2 4*a*c) == 0 disp (39。This equation has two distinct real roots.39。)。 elseif grade disp (39。The grade is D.39。)。 else if grade disp (39。The grade is C.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。)。 ) 。 ) = 39。 i nt 2 str ( i nd ex ) ] ) 。 axis (?on‘)。 title ( 39。y 1 = sin ( x ) 。 ) 。 ) 。 , 39。x = 0 : 0 . 05 : 2 。y 2 = exp ( x ) 。x = pi : pi / 20 : pi 。 Su bp lo t 1 title 39。y = c os ( x ) 。 ) 。 ko 39。 M a r k e r S i z e 39。 r 39。 g 39。 \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。kPa/mol K)。 ?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
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1