Добавил:
kostikboritski@gmail.com Выполнение курсовых, РГР технических предметов Механического факультета. Так же чертежи по инженерной графике для МФ, УПП. Писать на почту. Дипломы по кафедре Вагоны Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
41
Добавлен:
12.08.2017
Размер:
2.3 Mб
Скачать

Displaying Arrays / 45

Displaying Arrays

Mathcad automatically displays matrices and vectors having more than nine rows or columns as output tables rather than as matrices or vectors. Smaller arrays are displayed by default in traditional matrix notation. Figure 5-6 shows an example.

Figure 5-6: The top results display as a matrix while the bottom results display as an output table.

Note An output table displays a portion of an array. To the left of each row and at the top of each column, there is a number indicating the index of the row or column. Right-click on the output table and select Properties from the menu to control whether row and column numbers appear and to choose the font. If your results extend beyond the table, you can scroll through the table using scroll bars.

To resize an output table:

1.Click the output table. Handles appear along the sides of the table.

2.Move the mouse pointer to one of these handles so that it changes to a doubleheaded arrow.

3.Press and hold down the mouse button and drag the table in the direction you want the dimensions to change.

Tip You can change the alignment of the table with respect to the expression on the left-hand side of the equal sign. Right-click on the table, then choose one of the Alignment options from the menu.

Changing the Display of Arrays — Table versus Matrix

You can prevent Mathcad from displaying large matrices as output tables. You can also change matrices to output tables. To do so:

1.Click on the output table or matrix.

2.Choose Result from the Format menu.

3.Click on the Display Options tab.

4.Choose Matrix or Table in the “Matrix display style” drop-down box.

46 / Chapter 5 Range Variables and Arrays

To display all the results in your worksheet as matrices or as tables regardless of their size, click “Set as Default” in the Result Format dialog box rather than “OK.”

Note Mathcad cannot display extremely large arrays in matrix form. You should display a large array as an output table.

Changing the Format of Displayed Elements

To format the numbers in the array, just click on the displayed array and choose Result from the Format menu, then modify the settings. When you click “OK,” Mathcad applies the selected format to all the numbers in the table, vector, or matrix. It is not possible to format the numbers individually.

Copying and Pasting Arrays

You can copy an array of numbers directly from a tabular application, such as Excel, or an ASCII file that contains rows and columns, into a Mathcad array. All data characteristics, including text, numerics, complex numbers, or empty cells are preserved. Once you’ve performed computations or manipulations on the data, you can paste or export the resulting array of numbers back to its source or into another application.

To copy just one number from a result array, click the number and choose Copy from the Edit menu. Copying multiple numbers from a vector or matrix result differs depending on whether the array is displayed as a matrix or as an output table.

To copy a result array displayed as a matrix:

1.Drag-select the array to the right of the equal sign to place the entire array between the editing lines.

2.Choose Copy from the Edit menu.

3.You may only paste an array into a math placeholder or into a blank space in Mathcad.

4.You can also paste the array into another application.

To copy some or all of the numbers from a data table:

1.Click on the first number you want to copy.

2.Drag the mouse over the other values you want to copy while holding down the mouse button.

3.Right-click the selected values, then choose Copy Selection from the menu.

To copy all the values in a row or column, click on the column or row number shown to the left of the row or at the top of the column. Then choose Copy from the Edit menu.

After you have copied one or more numbers from an output table, you can paste them into another part of your worksheet, a blank Data Table, or into another application. Figure 5-7 shows an example of a new matrix created by copying and pasting numbers from an output table.

Соседние файлы в папке doc