Copyright

Array Editor Version 1 Release 1
© Copyright davidliebtag.com 2012, 2013
Licensed Materials - Property of davidliebtag.com


Array Editor

The Array Editor allows you to edit arbitrary arrays.

Selecting Arrays

There is always one selected array. Menu and tool bar commands that use an array are applied to the selected array. Initially, the top level array is the selected array.

  • The attributes and index of the selected array are drawn in the status bar.
  • To select an array, click the left mouse button on the array.
  • To change the selection, use the tab key. See Keys Help for more information.

Display of Arrays

The Array Editor uses the following rules to display arrays:

  • A focus rectangle is drawn around the selected array.
  • A box is drawn around each nonhomogeneous and nested array.
  • Each simple array is drawn in an input area. You can change simple arrays' values by typing in these areas.
  • If the selected array is a simple array, the Array Editor draws a caret at the input point.
  • Input areas for character and numeric scalars are drawn with a single pixel wide border.
  • Input areas for character and numeric arrays with rank greater than 0 are drawn with a sunken edge.
  • Character arrays with rank 1 that contain carriage returns and line feeds are drawn on multiple lines without scroll bars, unless the Show rank 1 array scrollbars option is checked.
  • Character and numeric arrays with rank 2 or greater are drawn with scroll bars and a sizing corner.
  • The left edge of each array with rank greater than 1 is drawn with one line for each dimension other than columns.
  • Floating point numbers are formatted using Saving floating point numbers may cause loss of precision.

Color of Arrays

The Array Editor uses the following colors:

  • The focus rectangle around the selected array is drawn using the first color specified for the Active Title Bar item in the Window Color and Appearance dialog. To access the Window Color and Appearance dialog, open the Control Panel's Window Color and Appearance page and click Advanced appearance settings....
  • The background of character and numeric arrays is drawn with the background color specified for the Window item.
  • The values of character arrays are drawn with the text color specified for the Window item.
  • The values of numeric arrays are drawn with a color that is calculated to be different than the window background and text colors.
  • The prototypes of empty nested arrays are drawn with the color specified for the Disabled Item item.
  • Selected text is drawn with the background and foreground colors specified for the Selected Items item.
  • Text found by the Find dialog is drawn with colors that are calculated to be different than the window background and text colors.
  • When a array is maximized, a red rectangle is drawn around it.
  • When the Use 3D edges option is off (the default), the box around the selected nested array is drawn using the colors specified for the Active Title Bar item. The boxes around other nested arrays are drawn using the colors specified for the Inactive Title Bar item.
  • MatLab structures' field names are drawn with the color specified for the Disabled Item item.
  • If a simple array's value is larger than the size of the input area, a transparent green line is drawn along the edges beyond which the data extends, unless the Show rank 1 array scrollbars option is checked.

The Array Editor displays the following attributes of the selected array in the status area:

Index of the selected array

To select another array, double click on the index; this action opens an edit window. Type the new index in the edit window.

Notes:

  • To select an element of an array with rank greater than 1, surround the dimensions' indices with parentheses.
  • If the index has unbalanced parentheses, the editor sounds an informational warning.
  • If the index is invalid for any other reason, the editor sounds an error warning.

Sounds

The Array Editor plays the system's asterisk sound when:

  • You try to paste unsupported data
  • Any command completes that took more than 5 seconds

The Array Editor plays the system's Exclamation sound when:

  • You try to type invalid characters in a simple numeric array
  • An invalid number is found during the Convert to numeric action
  • You try to change the number of rows in an array that has rank greater than 2 by pressing Enter or Delete
  • You try to request a command before the previous command has completed
  • Text is not found when the Find button is pressed
  • You try to open an object which is not a variable
  • You try to open a variable that is shared

The Array Editor plays the system's Question sound when:

  • When the Confirm Close option is checked and you close the window with unsaved changes
  • When you are about to replace the value of a variable

The Array Editor plays the system's Critical Stop sound when:

  • The Array Editor detects unsupported data in the argument array
  • An invalid index is entered
  • The Array Editor encounters a severe error

Restrictions

The Array Editor has the following restrictions:

  • Changing the length of any dimension other than the number of columns in arrays with rank greater than 2 is not supported.
  • Characters that cannot be represented using single UTF-16 code units are not supported.
  • Disclose does not support nonhomogeneous arrays containing decimal floating point numbers.
  • A single prototype is drawn in empty nested arrays. The rank and shape are displayed in the status area.
  • Print does not support decimal floating point numbers.
  • Sorting character arrays uses the characters' Unicode codepoints.
  • Sorting general arrays and arrays containing complex and decimal floating point numbers is not supported.

Consult the following sections for more information:

  • Keys Help - What keys you can use in the array editor
  • Menu Bar - The available commnds


Keys Help

Use F1 to show contextual help.

Use the following key combinations to move the array selection:

Tab | To the next array
Shift+Tab | To the previous array
Ctrl+Tab | To the next array with the same parent
Ctrl+Shift+Tab | To the previous array with the same parent
Ctrl+Up arrow | To the array's parent
Escape | To the selected array and close the pick index window

Use the following key combinations to scroll the data:

Left arrow | Right
Right arrow | Left
Up arrow | Down
Down arrow | Up
Page Up | Up by one screen height
Page Down | Down by one screen height
Ctrl+Page Up | Left by one screen width
Ctrl+Page Down | Right by one screen width

When the selected array has rank greater than 2, use the following key combinations to scroll through the array's planes:

Alt+Home | First plane
Alt+End | Last plane
Alt+Up arrow | Previous plane
Alt+Down arrow | Next plane
Alt+Page Up Alt+Page Down | If the item has less than 1000 planes, then Alt+Page Up and Alt+Page Down scroll by one tenth the number of planes. Otherwise, they scroll by one hundreth the number of planes.

Use the following key combinations to perform clipboard operations:

Ctrl+Shift+C | Copy the selected array to the clipboard
Ctrl+Shift+X | Copy the selected array to the clipboard and then delete it
Ctrl+Shift+V | Replace the selected item with the clipboard contents
Ctrl+Shift+Z | Removes the last array change
Ctrl+Shift+Y | Restores the last array change that was removed with undo

When a character or numeric item is selected, the following key combinations also perform clipboard operations:

Ctrl+C | Copy the selected text to the clipboard
Ctrl+X | Copy the selected text to the clipboard and then delete it
Ctrl+V | Replace the selected text with the clipboard contents
Ctrl+Z | Removes the last change
Ctrl+Y | Restores the last change that was removed with undo

Use Ctrl+F to open the Find dialog. Use Escape to close it. While the Find dialog is open, the following key combinations are enabled:

F3 | Find next
Shift+F3 | Find previous

Use the following key combinations to save the array, close the window, or validate and align modified values:

Ctrl+S | Save
Ctrl+O | Open
Shift+Ctrl+O | Open Object
Alt+F4 | Close
F5 | Check and Align

Note: Some combinations may not work with some APL keyboard input tools.

The Array Editor supports the following mouse actions:

Left click | Select an array
Right click | Select an array and display its popup menu
Mouse wheel | Scroll up and down
Shift+Mouse wheel | Scroll left and right
Ctrl+Mouse wheel | Increase and decrease font size
Alt+Mouse wheel | Scroll through planes of arrays with rank greater than 2
Left click and drag | Resize simple arrays with rank greater than 1
Double left click | Maximize an array or restore a maximized array

Use Shift+F10 to display the selected array's popup menu.


Menu Bar

The Array Editor menu bar includes the following pull-down menus:

File

Revert | Reverts to the value that existed when the editor was invoked
Open | Display the Open dialog
Open Object | Open the variable named at the caret position
Save | For the variable editor, sets the value into the variable named in the argument For the array editor, sets the value as the result that will be returned when the editor is closed
Save As | Saves the array using a new variable name (not available in all APL dialects)
Save and Close | Saves the array and closes the window
Exit | Closes the window
Page Setup | Opens the page setup dialog.
Print | Prints the array shown in the window.

Edit

Check and Align | Check numeric arrays for valid numbers, make all matrix rows the same length, align numeric columns, and reset sizes of all changed arrays
Cut array | Copies the selected array to the clipboard and deletes it from the array's parent
Copy array | Copies the selected array to the clipboard
Paste array | Replaces the selected array with the array on the clipboard
Undo array | Removes the last array change
Redo array | Restores the last change that was removed with undo
Empty undo buffer | Empties the undo and redo buffers
Cut | Copies the selected simple data to the clipboard and deletes it from the simple array
Copy | Copies the selected simple data to the clipboard
Paste | Replaces the selected simple data with the text on the clipboard
Find… | Shows the Find dialog
F3 | Find Next
Shift+F3 | Find Previous

Actions

The choices on the Actions menu change how an array is displayed or apply a function to the selected array.

Size to definition | Resizes the array editor window to fit the outer-most displayed value.
Restore | Restores a minimized or maximized array
Minimize | Displays the selected array as a button
Maximize | Expands the selected array to fill the array editor window
Reset size | Resets the size of the selected array to the size calculated by the array editor
Reset all sizes | Resets the sizes of all the elements
Convert to character | Converts array's contents to characters
Convert to numeric | Converts array's contents to numbers
Sort ascending | Sort the selected array in asending order
Sort descending | Sort the selected array in descending order
 | Creates a vector from the items in the selected array, taken in row-major order.
 | Creates a simple vector whose items are the simple scalars in the selected array.
First | Selects the first item of the selected array.
Enclose | Creates a scalar array whose only item is the selected array.
Disclose | Structures the items of selected array into an array, whose rightmost axes come from the axes of the items of selected array.
Reverse along last axis | Creates an array with the items of the selected array reversed along the last axis.
Reverse along first axis | Creates an array with the items of the selected array reversed along the first axis.
Transpose (reverse axes) | Reverses the order of the axes
Reorder axes | Reorders the axes of arrays with rank greater than 2
Make into rows of matrix | Create a matrix whose rows are the elements of the selected array
Make array of rows | Create an array whose elements are the rows of the selected array

Insert

The Insert commands are available when the selected array is contained in a vector or matrix. The commands insert one or more prototype elements.

Item to the left | Inserts an item to the left of the selected array
Item to the right | Inserts an item to the right of the selected array
Column to the left | Inserts a column to the left of the selected array
Column to the right | Inserts a column to the right of the selected array
Row above | Inserts a row above the selected array
Row below | Inserts a row below the selected array

Options

Tool bar | Shows or hides the tool bar
Status bar | Shows or hides the status bar
Font… | Opens the font dialog. The font selection is saved when the editor is closed. Turning the mouse wheel while pressing Ctrl changes the font size.
Always on top | Causes the array editor to always remain on top of other windows.
Confirm array close | Controls whether the Array Editor prompts you for confirmation when you close or refresh windows containing unsaved changes.
Line numbers | Show line numbers in maximized simple arrays
Overtype | Causes the Insert key to turn overtype mode on and off
Reject unsupported data | Signal a Domain Error if the argument contains an unsupported type of data.
Ruler | Show column ruler in maximized simple arrays
Show rank 1 array scrollbars | Show simple arrays that have rank 1 with scrollbars
Show whole cell | When selecting an array, scroll to show as much of the array as possible
Size to definition on open | Controls whether the Array Editor resizes the window to fit the initial value.
Use small icons | Use small icons in the tool bar
Use small margins | Use small margins around arrays
Use 3D edges | Draw 3 dimensional edges around nested arrays

Help

General Help | General help about the Array Editor
Keys Help | A list and description of the keys you can use
About Array Editor | Product information


Popup Menu

Right click on an array or press Shift+F10 to display the array's popup menu.

If the selected array is simple, the popup menu includes the following choices:

Undo | Removes the last change made to the simple array
Redo | Restores the last change that was removed with undo
Cut | Copies the selected data to the clipboard and deletes it from the simple array
Copy | Copies the selected data to the clipboard
Paste | Replaces the selected data with the text on the clipboard
Delete | Deletes the selected data
Cut array | Copies the selected array to the clipboard and deletes it from the array's parent
Copy array | Copies the selected array to the clipboard
Paste array | Replaces the selected array with the array on the clipboard
Select all | Selects all the data in the simple array
Restore | Restores a minimized or maximized array
Minimize | Displays the selected array as a button
Maximize | Expands the selected array to fill the window
Help | Displays this help

If the selected array is nested, the popup menu includes the following choices:

Cut array | Copies the selected array to the clipboard and deletes it from the array's parent
Copy array | Copies the selected array to the clipboard
Paste array | Replaces the selected array with the array on the clipboard
Restore | Restores a minimized or maximized array
Minimize | Displays the selected array as a button
Maximize | Expands the selected array to fill the window
Reset size | Resets the size of the selected array
Convert to character | Converts array's contents to characters
Convert to numeric | Converts array's contents to numbers
Sort ascending | Sort the selected array in asending order
Sort descending | Sort the selected array in descending order
 | Creates a vector from the items in the selected array, taken in row-major order.
 | Creates a simple vector whose items are the simple scalars in the selected array.
First | Selects the first item of the selected array.
Reverse along last axis | Creates an array with the items of the selected array reversed along the last axis.
Reverse along first axis | Creates an array with the items of the selected array reversed along the first axis.
Transpose (reverse axes) | Reverses the order of the axes
Reorder axes | Reorders the axes of arrays with rank greater than 2
Make into rows of matrix | Create a matrix whose rows are the elements of the selected array
Make array of rows | Create an array whose elements are the rows of the selected array
Item to the left | Inserts an item to the left of the selected array
Item to the right | Inserts an item to the right of the selected array
Column to the left | Inserts a column to the left of the selected array
Column to the right | Inserts a column to the right of the selected array
Row above | Inserts a row above the selected array
Row below | Inserts a row below the selected array
Help | Displays this help

Use the choices on the Edit, Actions, and Insert pull-down menus to apply these actions to character and numeric elements.


Find

Use Find to find or replace text.

Type the data you want to find in the Find field.

Press Next to find the next occurence of the data.
Press Previous to find the previous occurence of the data

Check Ignore case for a case insensitve search
Check Numeric to only search in numeric arrays
Clear Numeric to search in both character and numeric arrays


Open

Use Open to open an variable.

To open a variable, type the variable's name and press enter.


Reorder Axes

Use Reorder Axes to change the order of an array's axes.

Change the order of the axes' names to the desired order. Then,

  • Push Ok to reorder the axes, or
  • Push Cancel to leave the order of the axes unchanged.

Change the order of the axes' names by either of the following methods:

  • Pressing and holding the left mouse button and dragging the axes names.
  • Pressing the Ctrl+Up and Ctrl+Down keys.

Change an axis name by pressing F2 and typing the new name. When you are finished typing the new name, press Enter to save your changes or Escape to discard them.

Note: Modified axis names are preserved when you reorder axes. They are lost when you change the array in any other way.


Save As

Use Save As to specify a new variable name and save the array in the workspace.

Check Save selected array to save only the selected array.

Clear Save selected array to save the entire array.