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