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

正文內(nèi)容

idl_教程(編輯修改稿)

2024-09-26 14:11 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 tore the variables saved in the file “” you would execute the mand: IDL RESTORE, ?? A save file can be used to store your data in a form that is ready to be used by IDL, transfer data across platforms in a platform independent manner, and hide the source code of userwritten routines. Working in IDL In an IDL session, data (. numbers and strings) is stored in what?s known as variables. There are 3 basic types of IDL variables: IDL Short Course (version ) Research Systems, Inc. – A Kodak Company IDL? is a registered trademark of Research Systems, Inc. Page 7 of 37 ? Scalar (a single value) ? Array (from 1 to 8 dimensions。 a Vector is an array with only 1 dimension) ? Structure (an aggregate of various data types and other variables) Any given variable in IDL also has a specific data type. There are 12 basic atomic data types (seven different types of integers, two floatingpoint types, two plex types, and a string). These data types are delineated in Figure 2. The data type assigned to a variable is determined either by the syntax used when creating the variable, or as a result of some operation that changes the type of the variable. Figure 2: IDL data types Variables do not have to be declared in IDL. The type of a variable can be determined by its usage. If a variable is set equal to the sum of two integers, the variable will end up being an integer. For example, start by declaring a scalar variable named “a” and set it equal to a 16bit signed INTEGER value of (2): IDL a = 2 Next, declare a second scalar variable called “b” and set it equal to (5): IDL b = 5 You can now perform an arithmetic operation on these two variables and store the result in a new variable called “c” without having to first declare “c”: IDL c = a + b Since both variables “a” and “b” are of type INTEGER, so is the resulting variable “c”: IDL help, a, b, c A INT = 2 B INT = 5 C INT = 7 The IDL language is dynamically typed. This means that an operation on a variable can change not only its value but also that variable39。s data type. In general, IDL Short Course (version ) Research Systems, Inc. – A Kodak Company IDL? is a registered trademark of Research Systems, Inc. Page 8 of 37 when variables of different types are bined in an expression, the result has the data type that yields the highest precision. For instance, go back and redefine the variable “b” as a 32bit FLOATINGPOINT value of (5) and perform the same arithmetic operation again: IDL b = IDL c = a + b Even though the varialbes “a” and “b” have different data types, IDL will still allow operations on these variables together in the same statement: IDL help, a, b, c A INT = 2 B FLOAT = C FLOAT = You will notice that the resulting variable “c” now takes on the data type of the highest precision for the variables that were used in the operation to create “c”, which in this case is FLOATINGPOINT (variable “b”). You can also convert the data type of variables by using any of the type conversion routines listed in Figure 2 under the “Convert To” column. For example, to convert the variable “c” back to INTEGER you would use the FIX function: IDL c = FIX (c) IDL help, c C INT = 7 However, dynamic typing can also lead to problems if you are not careful. For instance, the precision of arithmetic operations is dictated by the variable?s data type. For example, if you define a variable “d” and set it to an INTEGER value of (5), the following division is performed with “integer precision” because both “a” and “d” are of type INTEGER: IDL d=5 IDL help, a, b, c, d A INT = 2 B FLOAT = C FLOAT = D INT = 5 IDL print, d / a 2 In order to perform floating division, at least one of the variables has to have a data type of FLOATINGPOINT: IDL print, b / a IDL is also an arrayoriented language, which means that operations occur on entire arrays at once without the need for loops. For example, declare a variable called “array” as a subscript value array of type INTEGER with 2 dimensions of size 5 columns and 5 rows: IDL array = INDGEN (5,5) IDL Short Course (version ) Research Systems, Inc. – A Kodak Company IDL? is a registered trademark of Research Systems, Inc. Page 9 of 37 IDL help, array ARRAY INT = Array[5, 5] IDL print, array 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 This creates a 2dimensional array where each element is set to the value of its onedimensional subscript. IDL is a rowmajor language, which means that arrays are internally indexed in memory according to row in order of the subscript values illustrated in this array. You can also manually define arrays (and vectors) manually using the [ ] operators, which are used for array concatenation: IDL vector = [0,1,2,3,4] IDL array = [ [0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14],[15,16,17,18,19], [20,21,22,23,24] ] IDL help, vector, array VECTOR INT = Array[5] ARRAY INT = Array[5, 5] In order to add the scalar value contained in the variable “d” to each element of this array, only one statement needs to be executed: IDL array = array + d IDL print, array 5 6 7 8 9 10 11 12 13 14 15
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1