Contents - Index


Array Editor

 

This command provides an easy way to enter or modify the values into the main program section of EES Arrays.

 

 

The dropdown edit rectangle at the top of the dialog displays the names of all of the arrays that are defined in the Equations window.  Select the name of the array for which you wish to enter or modify values.  If no arrays are defined, this rectangle will display -> Enter array name.  Enter the name of the new array.

 

The number of columns and rows in the array can be adjusted with the Rows and Columns controls.  Scroll bars will appear as needed to allow access to array cells that are not visible in the window.

 

The two speed buttons provide access to Copy and Paste.  The top button is the Copy button.  To select a range of cells, click the mouse in the upper left cell.  Hold the Shift key down and click in the lower right cell.  The Paste button is enabled only if text has been placed on the clipboard.  To paste text into this window, click the mouse in the upper left cell for which the paste operation is to start.  Pasting will proceed to the right and down the table.  The copy and paste capability make it possible to import or export data to and from a spreadsheet. 

 

Enter the values of the array elements that you wish to define in the table.  When you click the OK button, EES will convert the values that you have entered into EES equations and enter these into the Equations window.  The entered values will be placed within comments of the form:

{Array A}

...

{Array A end}

 

where A is the array name.  Do not delete or edit these comments.  EES uses these comments to locate the position in the equations window in which the array elements are defined.  If you later wish to redefine the array, EES will find the previous array using these comments and overwrite the array with the newly entered values.  Arrays will only be located in the main program (i.e., not in functions, procedures or subprograms).  However, you can copy/paste an array entered into the main program into a function, procedure or subprogram.

 

Note that arrays can also be defined using Array Range Notation.  For example, the following line assigns values to array B:

 

B[1..4]=[22, 33, Z^2, Y]  

 

This equation provides a short-hand but equivalent alternative to entering:

 

B[1]=22; B[2]=33; B[3]=Z^2;  B[4]=Y

 

Units can aslo be assigned to the numercial values by either providing the units with each value, e.g.,

 

B[1..4]=[22 [kJ], 33  [kJ], z^2, Y]

 

or by providing the units in brackets at the end of the assignment,  e.g.,

 

B[1..4] =[22, 33, Z^2, Y]  [kJ]

 

In this last example, only the arrays elements that are being set to numerical values (B[1] and B[2]) will have their units assigned.