5f892713c3 2021-03-03 1: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5f892713c3 2021-03-03 2: % WELCOME TO iCAS
5f892713c3 2021-03-03 3: %
5f892713c3 2021-03-03 4: % The core of iCAS is based on REDUCE, a powerful CAS system with comparable capabilities
5f892713c3 2021-03-03 5: % to Maple and Mathematica with a track record spanning over 40 years in academic and research
5f892713c3 2021-03-03 6: % institutions. iCAS brings all the capabilities of REDUCE and the embedded gnuplot plotting
5f892713c3 2021-03-03 7: % engine to your iPad. Best of all, iCAS is entirely self-contained and runs natively on your iPad
5f892713c3 2021-03-03 8: % so no internet connection is required to harness its power.
5f892713c3 2021-03-03 9: %
5f892713c3 2021-03-03 10: % This file is written as a short tutorial to walk you through some simple examples to become
5f892713c3 2021-03-03 11: % familiar with the app and help you get started.
5f892713c3 2021-03-03 12: %
5f892713c3 2021-03-03 13: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5f892713c3 2021-03-03 14: % BASIC USAGE
5f892713c3 2021-03-03 15: %
5f892713c3 2021-03-03 16: % Enter the desired command or operation and press return to execute the command or operation.
5f892713c3 2021-03-03 17: % Try it by tapping to the right of the semicolon on the line below and then tapping return.
5f892713c3 2021-03-03 18:
5f892713c3 2021-03-03 19: 6 * 7;
5f892713c3 2021-03-03 20:
5f892713c3 2021-03-03 21: % If fancy output is enabled, the results can be viewed in a typeset format by tapping a translucent
5f892713c3 2021-03-03 22: % button that appears on the upper right hand corner of this view when there is fancy output or
5f892713c3 2021-03-03 23: % iCAS detects LaTeX content. The output view can be zoomed using the standard pinch gestures.
5f892713c3 2021-03-03 24: %
5f892713c3 2021-03-03 25: % Fancy output can be globally enabled with the "Create Fancy Output" option or on a case by case
5f892713c3 2021-03-03 26: % basis using the fancy switch. If fancy output is enabled and the "Automatically Show" option is
5f892713c3 2021-03-03 27: % enabled, iCAS will automatically show the rendered fancy output when it is generated.
5f892713c3 2021-03-03 28: %
5f892713c3 2021-03-03 29: % Execute the following lines (i.e. place the cursor to the right of the semicolon and tap the return
5f892713c3 2021-03-03 30: % key) to see the difference between plain and fancy output.
5f892713c3 2021-03-03 31:
5f892713c3 2021-03-03 32: df(x^x,x);
5f892713c3 2021-03-03 33: on fancy;
5f892713c3 2021-03-03 34: df(x^x,x);
5f892713c3 2021-03-03 35:
5f892713c3 2021-03-03 36: % Notice the pseudo-LaTeX output format and the "TeX" translucent button that appeared on the
5f892713c3 2021-03-03 37: % top right of the window. Tapping the "TeX" button generates a typeset version of the file that
5f892713c3 2021-03-03 38: % can be optionally emailed as a LaTeX source file for publishing, presentation, and/or sharing with
5f892713c3 2021-03-03 39: % colleagues.
5f892713c3 2021-03-03 40: %
5f892713c3 2021-03-03 41: % Fancy output works best with a line length of 80 or more. iCAS sets the linelength to the optimal
5f892713c3 2021-03-03 42: % width for plain output when a CAS session is started based on the font style and size settings.
5f892713c3 2021-03-03 43: % Therefore, we recommend setting the linelength to 80 when using fancy output. iCAS provides a
5f892713c3 2021-03-03 44: % convenience command called fancy_output that sets the fancy switch and sets the linelength to 80
5f892713c3 2021-03-03 45: % characters. Note that turning the fancy switch off does not affect the linelength so you may need
5f892713c3 2021-03-03 46: % to set the linelength to an appropriate value after using fancy output. The linelength is reset when
5f892713c3 2021-03-03 47: % a new CAS session is initiated (e.g. by using either the "bye" or "quit" command).
5f892713c3 2021-03-03 48: %
5f892713c3 2021-03-03 49: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5f892713c3 2021-03-03 50: % KEYBOARD USAGE
5f892713c3 2021-03-03 51: %
5f892713c3 2021-03-03 52: % By default, iCAS uses the system keyboard. A user configurable macro keyboard and a
5f892713c3 2021-03-03 53: % numerical keyboard are also optionally available. The enabled keyboards and the default
5f892713c3 2021-03-03 54: % keyboard can be configured in the app Settings. The app Settings can be accessed either through the
5f892713c3 2021-03-03 55: % global Settings app or by tapping the Settings button on the top right corner of the screen.
5f892713c3 2021-03-03 56: %
5f892713c3 2021-03-03 57: % To switch between the enabled keyboards, use a horizontal swipe gesture in the text area when a
5f892713c3 2021-03-03 58: % keyboard is active.
5f892713c3 2021-03-03 59: %
5f892713c3 2021-03-03 60: % By default, tapping a button other than the "CLEAR" or "BATCH" buttons on the macro
5f892713c3 2021-03-03 61: % keyboard causes the active keyboard to automatically switch to the system keyboard to allow
5f892713c3 2021-03-03 62: % entry of variables, parameters, arguments, etc. This behavior can be enabled/disabled using the
5f892713c3 2021-03-03 63: % "Auto Hide Macros" setting.
5f892713c3 2021-03-03 64: %
5f892713c3 2021-03-03 65: % Tap the clear line below to active the keyboard and swipe from right to left to reveal the macro
5f892713c3 2021-03-03 66: % keyboard. Now tap the "integral" button.
5f892713c3 2021-03-03 67:
5f892713c3 2021-03-03 68:
5f892713c3 2021-03-03 69:
5f892713c3 2021-03-03 70: % Now double tap "function" and replace it with some function of x, say x, to keep it quick and
5f892713c3 2021-03-03 71: % simple. Then execute the line. Unless you've disabled fancy output, iCAS will have output a
5f892713c3 2021-03-03 72: % pseudo-LaTeX output that you can view by tapping the "TeX" button at the top right. Go ahead
5f892713c3 2021-03-03 73: % and tap it to see the output in the LaTeX viewer.
5f892713c3 2021-03-03 74: %
5f892713c3 2021-03-03 75: % Tapping return on the system keyboard can be configured to automatically switch to the macro
5f892713c3 2021-03-03 76: % keyboard to enable the entry of other CAS commands. This is controlled by the "Return Shows
5f892713c3 2021-03-03 77: % Macros" setting.
5f892713c3 2021-03-03 78: %
5f892713c3 2021-03-03 79: % To edit the contents of a macro button, tap and hold down the button for 1 second or longer.
5f892713c3 2021-03-03 80: %
5f892713c3 2021-03-03 81: % Instances of \n in macros get automatically converted into new lines. This makes it possible to
5f892713c3 2021-03-03 82: % create macros with text spanning multiple lines.
5f892713c3 2021-03-03 83: %
5f892713c3 2021-03-03 84: % Assigning \r to a macro button turns that button into a silent return key. That is, it inserts a
5f892713c3 2021-03-03 85: % new line character without processing the contents of the line.
5f892713c3 2021-03-03 86: %
5f892713c3 2021-03-03 87: % Assigning \b to a macro button turns that button into a backspace/delete key.
5f892713c3 2021-03-03 88: %
5f892713c3 2021-03-03 89: % Assigning \c to a macro button turns that button into a clear key.
5f892713c3 2021-03-03 90: %
5f892713c3 2021-03-03 91: % Assigning \cb to a macro button turns that button into a clear batch output key. The macro has
5f892713c3 2021-03-03 92: % no effect if there is no batch output.
5f892713c3 2021-03-03 93: %
5f892713c3 2021-03-03 94: % The cursor placement within a macro can be optionally specified by including \^ in the macro where
5f892713c3 2021-03-03 95: % the cursor should be after the macro is inserted. For example, the macro “(\^)” will cause the
5f892713c3 2021-03-03 96: % cursor to be placed between the two parentheses.
5f892713c3 2021-03-03 97: %
5f892713c3 2021-03-03 98: % The macro buttons can be optionally labelled by including the desired label surrounded by the #
5f892713c3 2021-03-03 99: % character in the macro text. For example, if a macro contains #LABEL#, the button will display
5f892713c3 2021-03-03 100: % LABEL in a larger font instead of the actual contents of the macro.
5f892713c3 2021-03-03 101: %
5f892713c3 2021-03-03 102: % The following labels (in uppercase) are automatically displayed with the mathematical symbol for
5f892713c3 2021-03-03 103: % the corresponding CAS operator/constant: DF, E, I, INFINITY, INT, PI, PROD, and SUM.
5f892713c3 2021-03-03 104: %
5f892713c3 2021-03-03 105: % The default integral, derivative, pi, and infinity buttons are examples that utilize these features.
5f892713c3 2021-03-03 106: %
5f892713c3 2021-03-03 107: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5f892713c3 2021-03-03 108: % PLOTTING
5f892713c3 2021-03-03 109: %
5f892713c3 2021-03-03 110: % iCAS includes a full implementation of gnuplot that can be accessed in CAS mode using the
5f892713c3 2021-03-03 111: % gnuplot package or directly in plot mode (more on modes later). By default, iCAS loads the
5f892713c3 2021-03-03 112: % gnuplot package so unless you changed the "Always Load gnuplot" setting, it should already be
5f892713c3 2021-03-03 113: % loaded.
5f892713c3 2021-03-03 114: %
5f892713c3 2021-03-03 115: % By default, iCAS automatically shows newly generated or updated plots. This behavior can be
5f892713c3 2021-03-03 116: % disabled in the global settings.
5f892713c3 2021-03-03 117: %
5f892713c3 2021-03-03 118: % Plots can be magnified using the standard pinch gestures. iCAS supports landscape orientations
5f892713c3 2021-03-03 119: % in all its views so plots can be viewed in either portrait or landscape orientations. Execute the
5f892713c3 2021-03-03 120: % line below to see plotting in action and use the pinch gesture to zoom in/out and swipe gestures
5f892713c3 2021-03-03 121: % to pan around the plot while zoomed in.
5f892713c3 2021-03-03 122:
5f892713c3 2021-03-03 123: plot(sin(x));
5f892713c3 2021-03-03 124:
5f892713c3 2021-03-03 125: % Unless specified, iCAS uses the title "iCAS Plot" and the file name "CASPlot" for plot files. The
5f892713c3 2021-03-03 126: % default plot title can be changed in the global settings and can also be set on a per plot basis.
5f892713c3 2021-03-03 127: % Execute the below line to see an example.
5f892713c3 2021-03-03 128:
5f892713c3 2021-03-03 129: plot(cos(x), title="cos(x)", output="cos(x)");
5f892713c3 2021-03-03 130:
5f892713c3 2021-03-03 131: % Plot files can be accessed by tapping the "folder" button on the right side of the menu bar. Go
5f892713c3 2021-03-03 132: % ahead and tap the button now.
5f892713c3 2021-03-03 133: %
5f892713c3 2021-03-03 134: % The files organizer picker has four wheels. One for text files such as this one, one for plot files,
5f892713c3 2021-03-03 135: % one for REDUCE inout files, and one for macro keyboard files. Aim the left picker wheel to view the
5f892713c3 2021-03-03 136: % corresponding files. Files can be deleted, mailed, or viewed/selected with the buttons above the
5f892713c3 2021-03-03 137: % picker wheels.
5f892713c3 2021-03-03 138: %
5f892713c3 2021-03-03 139: % The displayed contents can be emailed, copied, or printed by tapping the "send" button button on
5f892713c3 2021-03-03 140: % the right side of the bottom toolbar. Text files are emailed using the active font style. The
5f892713c3 2021-03-03 141: % font style, font size, and colors can be configured using the styles panel revealed by tapping the
5f892713c3 2021-03-03 142: % "styles" button on the left of the bottom toolbar. The available font styles are "Helvetica", "Times",
5f892713c3 2021-03-03 143: % and "Courier". Although not the prettiest, Courier can be optimal as it is the closest to a monospace
5f892713c3 2021-03-03 144: % font on iOS devices.
5f892713c3 2021-03-03 145: %
5f892713c3 2021-03-03 146: % Plots can be emailed in SVG format which is a resolution independent format supported by major
5f892713c3 2021-03-03 147: % major browsers including Safari and FireFox.
5f892713c3 2021-03-03 148: %
5f892713c3 2021-03-03 149: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5f892713c3 2021-03-03 150: % OPERATION MODES
5f892713c3 2021-03-03 151: %
5f892713c3 2021-03-03 152: % iCAS supports three operation modes.
5f892713c3 2021-03-03 153: %
5f892713c3 2021-03-03 154: % • CAS Mode
5f892713c3 2021-03-03 155: % • Plot Mode
5f892713c3 2021-03-03 156: % • Text Editor Mode
5f892713c3 2021-03-03 157: %
5f892713c3 2021-03-03 158: % By default, the application's color theme changes to indicate the active mode. This color feedback
5f892713c3 2021-03-03 159: % behavior can be disabled in the app Settings, if desired.
5f892713c3 2021-03-03 160: %
5f892713c3 2021-03-03 161: % In CAS mode (the current mode unless you've changed the mode with the mode controls switch
5f892713c3 2021-03-03 162: % in the middle of the toolbar), iCAS behaves as a terminal interface to the CAS engine.
5f892713c3 2021-03-03 163: %
5f892713c3 2021-03-03 164: % In Plot mode, iCAS behaves as a direct terminal interface to the gnuplot engine. Go ahead and
5f892713c3 2021-03-03 165: % dismiss the keyboard and tap the "plot" mode button (the button with a graph) to switch to Plot
5f892713c3 2021-03-03 166: % mode. Then execute each of the following lines in sequence. This is an example straight from the
5f892713c3 2021-03-03 167: % gnuplot demonstration samples web page.
5f892713c3 2021-03-03 168:
5f892713c3 2021-03-03 169: set output "3D Log"
5f892713c3 2021-03-03 170: set title "3D Log"
5f892713c3 2021-03-03 171: set samples 30; set isosamples 30
5f892713c3 2021-03-03 172: set hidden3d
5f892713c3 2021-03-03 173: set pm3d
5f892713c3 2021-03-03 174: set surface
5f892713c3 2021-03-03 175: set view 50,220
5f892713c3 2021-03-03 176: set xrange [-2:2]
5f892713c3 2021-03-03 177: set yrange [-2:2]
5f892713c3 2021-03-03 178: splot log(x*x*y*y)
5f892713c3 2021-03-03 179:
5f892713c3 2021-03-03 180: % As you can see, iCAS accepts gnuplot commands directly.
5f892713c3 2021-03-03 181: %
5f892713c3 2021-03-03 182: % In Text Editor mode, iCAS behaves as a plain text editor. Pressing return does not invoke either
5f892713c3 2021-03-03 183: % CAS or plot operations. This mode is useful for general-purpose text editing, to create input files
5f892713c3 2021-03-03 184: % for batch execution (described below), to create/preview LaTeX documents, etc.
5f892713c3 2021-03-03 185: %
5f892713c3 2021-03-03 186: % The active file is automatically saved when the application is quit/placed in the background or
5f892713c3 2021-03-03 187: % when a new file is opened.
5f892713c3 2021-03-03 188: %
5f892713c3 2021-03-03 189: % There may be times when you need to abort the active CAS session. To abort a CAS session that is
5f892713c3 2021-03-03 190: % idle, simply use the REDUCE "bye" or "quit" command. A new session will be automatically
5f892713c3 2021-03-03 191: % restarted. To abort a CAS session that is busy, tap the "Abort" button that replaces the
5f892713c3 2021-03-03 192: % "Settings" button while iCAS is busy. Set the mode to CAS mode using the mode buttons and go
5f892713c3 2021-03-03 193: % ahead and abort the CAS session using the following example that intentionally invokes a very long
5f892713c3 2021-03-03 194: % for-loop.
5f892713c3 2021-03-03 195:
5f892713c3 2021-03-03 196: for i:=0:10000000 do j:=i;
5f892713c3 2021-03-03 197:
5f892713c3 2021-03-03 198: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5f892713c3 2021-03-03 199: % BATCH OPERATION
5f892713c3 2021-03-03 200: %
5f892713c3 2021-03-03 201: % In addition to the interactive operation that we've just used, iCAS supports batch execution of
5f892713c3 2021-03-03 202: % entire file contents. That is, iCAS can process the entire contents of the active file either in CAS
5f892713c3 2021-03-03 203: % mode or Plot mode. To do so, use the special "BATCH" macro keyboard button. Unlike
5f892713c3 2021-03-03 204: % interactive results which are output at the current cursor location, CAS mode batch execution
5f892713c3 2021-03-03 205: % results are appended to the end of the file surrounded by "%%% Begin Batch Results" and
5f892713c3 2021-03-03 206: % "%%% End Batch Results" so they can be easily located with a quick search.
5f892713c3 2021-03-03 207: %
5f892713c3 2021-03-03 208: % Plot mode results are of course the creation of plot files. Note that plot files are not
5f892713c3 2021-03-03 209: % automatically shown when they are generated in batch mode. To view batch generated plot
5f892713c3 2021-03-03 210: % files, please use the files picker.
5f892713c3 2021-03-03 211: %
5f892713c3 2021-03-03 212: % Now, this file contains interactive output from the examples that we've run so if you process this
5f892713c3 2021-03-03 213: % file in batch mode, it will result in errors. Therefore, please try batch execution using one of the
5f892713c3 2021-03-03 214: % example files.
5f892713c3 2021-03-03 215: %
5f892713c3 2021-03-03 216: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5f892713c3 2021-03-03 217: % FOR MORE INFORMATION
5f892713c3 2021-03-03 218: %
5f892713c3 2021-03-03 219: % We hope that you found this tutorial helpful. You'll find more examples for various areas in the
5f892713c3 2021-03-03 220: % files picker. You will also find more information in the iCAS FAQ at the following URL.
5f892713c3 2021-03-03 221: %
5f892713c3 2021-03-03 222: % http://alsoftiphone.com/iCAS/faq
5f892713c3 2021-03-03 223: %
5f892713c3 2021-03-03 224: % Last but not least, if you have any questions or feedback, please don't hesitate to contact us at
5f892713c3 2021-03-03 225: % support@alsoftiphone.com. You can quickly do so by either tapping the "i" button on the bottom
5f892713c3 2021-03-03 226: % right corner and then tapping the "Feedback" button or by tapping the "Contact Support" button at
5f892713c3 2021-03-03 227: % the bottom of the app Settings.
5f892713c3 2021-03-03 228: %
5f892713c3 2021-03-03 229: % We hope that you will find iCAS a useful companion for your computation needs.
5f892713c3 2021-03-03 230: %
5f892713c3 2021-03-03 231: % Best Regards,
5f892713c3 2021-03-03 232: % AL Software
5f892713c3 2021-03-03 233: %
5f892713c3 2021-03-03 234: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%