~ Included basic functions for MathPad I love MathPad, because it's simple to use, it needs small memory, and it's possible to have in the same document a lot of comments, calculations and results. New version 2.5.2 brings enhancements such as copy plot at 288 dpi and possibilities to control curves colors and makers (and othersŠ). For these reasons, it's very easy for a teacher (for example) to make a correct (of an exercise, an exam) with MathPad. One problem with MathPad is that itıs very basic, and when one wants to manipulate arrays, syntax becomes very quickly heavy and unreadable. One big advantage of Mathpad is itıs open concept : we can build files of additional functions and call them at the begining of one calculation file by the keyword "include". I'm a big user of MathPad, and I made such functions in order to simplify my task. As MathPad is free (one other big advantage), I thought it should be a good thing that my work serves to other MathPad users. __________________________________________________________________ In the file "basic", there are following functions : linspace : creates vectors of linearly spaced values logspace : creates vectors of logarithmically spaced values concath : concatenates horizontally two arrays or vectors concatv : concatenates vertically two arrays or vectors interplin : interpolates values from a couple of vectors deriv : derivates one vector versus one other sort : sorts an array size : gives the dimensions of an array length : gives the bigger dimension of an array rem : gives the remainder of two numbers mod : gives the modulus of two numbers sgn : gives the sign of a number int : gives integer part of a number frac : gives the fractionnal part of a number stair : creates an array for direct staircase plot with plotline command bar : creates an array for direct bargraph plot with plotline command __________________________________________________________________ ******* Problems ******* As included files are opened and evaluated simultaneously with your own calculation file, there may have some interferences with global variables such as subscript or other. In order to avoid that, I wrote all functions with special names for internally used global variables : subs_xx, cnt_xx, flg_xx, glob_xx, where xx is a number between 01 and 99. So, the two function files (and I hope others in the future !) can be opened simultaneously without any interference, and if you avoid these names in your calculation files, you will have no problem. ******* Contact ******* For comments, bug report, suggestions, please contact me by email : chevallier.dominique@free.fr Dominique Chevallier, Toulouse, France ~