Unformatted text preview: Matlab would ﬁrst compute TF-32, replacing it with a value. Then 5/9 would be computed and this value would multiply the previously computed value of TF-32. Easier to understand: TC = (5/9)*(TF-32) • Use multiple statements Consider the equation: H (s) = s2 + 4s + 13 s3 − 2s2 + 4s + 5 Matlab commands: numerator = s^2 + 4*s + 13; denominator = s^3 - 2*s^2 + 4*s + 5; H = numerator/denominator; Special variables: ans: default variable name pi: ratio of circle circumference to its diameter, π = 3.1415926... eps: smallest amount by which two numbers can diﬀer inf or Inf : inﬁnity, e.g. 1/0 nan or NaN : not-a-number, e.g. 0/0 date: current date in a character string format, such as 19-Mar-1998. flops: count of ﬂoating-point operations. Commands involving variables: who: lists the names of deﬁned variables whos: lists the names and sizes of deﬁned variables clear: clears all variables, resets default values of special variables clear var: clears variable var clc: clears the command window, homes the cursor (moves the prompt to the top line), but does not aﬀect variables. clf: clears the current ﬁgure and thus clears the graph window. more on: enables paging of the output in the command window. more off: disables paging of the output in the command window. When more is enabled and output is being paged, advance to the next line of output by pressing Enter ; get the next page of output by pressing the spacebar. Press q to exit out of displaying the current item. Example 2.2 Listing and clearing variables >> who Your variables are: 21 ...
View Full Document
This note was uploaded on 03/07/2010 for the course ENG 101 taught by Professor Chang during the Summer '09 term at 東京国際大学.
- Summer '09