|
| 1 | +# Classpad programs |
| 2 | + |
| 3 | +## https://classpad.github.io |
| 4 | + |
| 5 | +This repository is a compilation of classpad programs I used in year 12. |
| 6 | + |
| 7 | +They are licensed under the gnu public license v3 (See `COPYING` for more information). Please read the license before modifying the files. |
| 8 | + |
| 9 | +--- |
| 10 | +## How can I use this repository? |
| 11 | +--- |
| 12 | + |
| 13 | +## User installation |
| 14 | + |
| 15 | +### Option 1: Install eActivity. |
| 16 | + |
| 17 | +In this directory there is a file named `spec_method_programs-(eActivity).xcp`. Connect your classpad to a computer and copy this eActivity file to the autoimport directory of the classpad. |
| 18 | + |
| 19 | +From here you can copy the programs to the `library` directory in the classpad using the variable manager (while the eActivity is opened), to use the programs outside of the eActivity, for example, in the `main` application. |
| 20 | + |
| 21 | + |
| 22 | +### Option 2: Install individual programs |
| 23 | +Go to the `binary/` directory. Located there are files with the `.XCP` extension. Connect your classpad to a computer and copy the programs files you want to the autoimport directory of the classpad. |
| 24 | + |
| 25 | +See section 15-2 of the classpad manual for more information on transferring files. |
| 26 | + |
| 27 | +--- |
| 28 | +## Using source code |
| 29 | +--- |
| 30 | + |
| 31 | +The source is included in `source/` |
| 32 | + |
| 33 | +Classpad programs, like all other data files, are encoded in the `.XCP` format, which is unfortunately a binary format. Some have decoded this format but I have no intention to do so. Therefore, the only option is to copy the raw text (Below the line `--- ONLY COPY BELOW THIS SECTION ---`), then in Classpad manager use `Paste Special` when in the program editor. |
| 34 | + |
| 35 | +Do not forget to copy/paste the arguments into the top bar, detailed in the `'Args` line. |
| 36 | + |
| 37 | +Note that some editing may be requried. These `Manual replacements` are detailed at the header of each source file. For example, subscripts which do not copy over well. |
| 38 | + |
| 39 | +The original source files (What I actually used in my WACE exams) are also included in the `original_source/` directory. |
| 40 | + |
| 41 | +--- |
| 42 | +## Why the odd function names? |
| 43 | +--- |
| 44 | +It's because as part of my workflow, I made extensive use of shift-keys. Because I had shift-keys assigned for every button, I just ended up using existing shift-keys and appending a number to the end. My workflow became `shift+key -> left arrow -> number -> right arrow`, which was only marginally slower. Unfortunately that means the programs are less readable. However **feel free to rename the programs in the variable manager** to whatever you want. |
| 45 | + |
| 46 | +--- |
| 47 | +## Guide/Explanation of each program |
| 48 | +--- |
| 49 | +## `cis0(power, C)` |
| 50 | +[v1.0.0] |
| 51 | + |
| 52 | +De Moivre root finder. Lists all possible roots of `z^power = C`, in both polar/rectangular form. Ensures the angles are within the definition of `arg(z)` (`-pi=<\theta=<pi`). |
| 53 | + |
| 54 | +## `diff0(expression)` |
| 55 | +[v1.0.0] |
| 56 | + |
| 57 | +Analyzes an _expression_ (MUST BE IN TERMS OF `x`) and returns the critical points (maximum, minimum, inflection, undulation points) in a neat tabular form, along with the differentiatied functions and the global maximum/minimum. |
| 58 | + |
| 59 | +* LMAX (Local maximum): `dy/dx = 0, d^2y/dx^2 < 0` |
| 60 | +* LMIN (Local minimum): `dy/dx = 0, d^2y/dx^2 > 0` |
| 61 | +* INFL (Inflection): `d^2y/dx^2 > 0, d^3y/dx^3 != 0` |
| 62 | +* UNDULATN (Undulation): `d^2y/dx^2 = 0, d^3y/dx^3 = 0` |
| 63 | + |
| 64 | +A point of undulation appears to be an inflection looking at the second derivative, but in reality is not. An example function is `x^4`, which has a point of undulation (and a minimum) at `(0,0)` |
| 65 | + |
| 66 | +Please note that this program may struggle with periodic functions (`sin`, `cos`, `tan`, etc.), due to the `constn(n)` variable. It is up to you to manually evaluate the table for each value of `constn`. You can do this by taking the output and using `ans|{constn(0)=n1,constn(1)=n2,...}`. |
| 67 | + |
| 68 | +Additionally, you need to enable `complex` mode when evaluating anything that can return complex numbers, or else it'll fail. For example, with the expression `ln(x)-x`. For methods students, ignore anything containing `i`. |
| 69 | + |
| 70 | +## `impDiff0(equation)` |
| 71 | +[v1.0.0] |
| 72 | + |
| 73 | +Analyzes an _equation_ (MUST BE IN TERMS OF `y` AND `x`) and returns the differentiated function and points where `dy/dx=0` and `d^2y/dx^2=0`. Feel free to cancel the calculation in the middle if the second step takes to long (Finding solutions for `d^2y/dx^2=0` is more intensive). |
| 74 | + |
| 75 | +Note that this does not evaluate the nature of the points. I'm leaving that up to you to do. I may add this feature in a future version. |
| 76 | + |
| 77 | +## `ln0([x],[P(X=x)])` |
| 78 | +[v1.0.0] |
| 79 | + |
| 80 | +Creates a summary list for a discrete random variable |
| 81 | + |
| 82 | +Requires _two column matrices_. The first one contains the values of `x`, the second the probabilities for each value of `x` [ `P(X=x)` ]. It returns the expected value, the expected value of the squares of x and the variance/standard deviation. |
| 83 | + |
| 84 | +A warning is emitted if the sum of the probabilities is NOT 1. |
| 85 | + |
| 86 | +You may ask, _"why did you go through the trouble of making this when there's literally an identical program in the `statistics` tab?"_. Firstly, switching from `main` wastes time. Yes, there is a `DispStat` function but I don't like how it displays more than we need. Also it's displaying approximate values, not exact. So the reason is basically because I don't like the workflow of `statistics` tab. |
| 87 | + |
| 88 | +## `ln1(expression,a,b)` |
| 89 | +## or `ln1(expression,n,n)` |
| 90 | +[v1.0.0] |
| 91 | + |
| 92 | +Creates a summary list for a continuous random variable, similar to `ln0`. |
| 93 | + |
| 94 | +Has two operating modes. **First** mode evaluates this summary list from the lower limit `a` to the upper limit `b` for an `expression` IN TERMS OF `x` (The probability density function/PDF). Returns expected value, variance/standard deviation, median (approximate), "median expression" (You can find the exact median by using `solve(0.5=<median expression>)`) and the CDF (as a complete piecewise function). |
| 95 | + |
| 96 | +The **second** operating mode finds another limit given some known limit, `n`. It does this by ensuring the integral equals 1. It has no problems working with limits to infinity (like in PDFs which have an asymptote). |
| 97 | + |
| 98 | +## `solve0([linear system])` |
| 99 | +[v1.0.0] |
| 100 | + |
| 101 | +Solves a linear system in matrix form. Matrix must be `m*(m+1)` (One wider than tall), as it contains the constant each row is equal to. |
| 102 | + |
| 103 | +Solutions are returned as a row matrix, each element corresponding to the variable describing one column of the input |
| 104 | + |
| 105 | +Returns echelon matrix and solution (as a column matrix) |
| 106 | + |
| 107 | +## `solve1({y=f(t),x=g(t)})` |
| 108 | +[v1.0.0] |
| 109 | + |
| 110 | +**Important note!** This function doesn't always work. Sometimes it just wastes classpad time trying to find a solution. Never rely on this for an answer. |
| 111 | + |
| 112 | +Attempts to find the equation `y=h(x)`. The input must be a list (use curly braces) which contains two functions, one equal to `x` and one equal to `y`, both in terms of `t`. It then returns two solutions as a list, both in the form `y=h(x)`. You must evaluate which of the two is correct (if any). The `t`-values substituted to calculate each solution are then printed. |
| 113 | + |
| 114 | +## `θθ(p,n)` |
| 115 | +[v1.0.0] |
| 116 | + |
| 117 | +Multipurpose probability utility |
| 118 | + |
| 119 | +* Outputs a table of conditions (n >= 30, np >= 10, n(1-p) >= 10) which need to be met for a sample size to be considered 'large enough' to approximate a normal distribution (CLT). |
| 120 | + * 1st row is the condition |
| 121 | + * 2nd row states if the condition is met |
| 122 | + * 3rd row states is the value of the condition |
| 123 | + * 4th row the minimum value to satisfy the condition. |
| 124 | +* Outputs the standard deviation (`SD(σ)`) |
| 125 | +* Outputs a table of confidence intervals and their margin of error, `M_ERR`, at commonly-used confidence levels (90,95,99) |
| 126 | +* Sets a series of variables to commonly-used constants. All of these variables are prefixed with `θ`. Best used with a shift-key for `θ` [ `SHIFT+)` ]. |
| 127 | + * `θ90`,`θ95`,`θ99`: Z-scores for confidence intervals of 90,95 and 99 |
| 128 | + * `θ36`: A matrix containing values for two-die (I know this is basic stuff, but sometimes I want to manually validate something just to be safe. Also dice questions come up all the time.) |
| 129 | + |
| 130 | +## ~~`tan0(y=f(x),a,b)`~~ |
| 131 | +[v1.0.0] |
| 132 | + |
| 133 | +~~Evaluates volumes of solids of revolution for a function `y=f(x)` (MUST include `y` and `x`). It will then prompt the user for which axis `a -> b` are located on. It returns a table containing volume rotated around x and y, and volume to an axis rotated about the other axis.~~ |
| 134 | + |
| 135 | +### **DO NOT USE** - use eActivity VSR tab instead. |
0 commit comments