Math Minion 1.4
Version 1.4 of Math Minion has been released to iOS and Mac app stores, with the following goodies:
- ml unit was incorrect (10-9 m^3 instead of 10-6 m^3)
- Added fluidoz unit (quart/32)
- Added an index shortcut, such that you can use 0 as a row index to select all rows, assuming there is a column index. Thus x[ 0, 2 ] is equal to x[ 1:{rows x}, 2 ]
The above actually made it into 1.3 for the Mac, but not the iOS version
- Fixed problem on iPad where the keyboard could block part of a note in fullscreen mode.
- Fixed problem with popover windows on the iPad, where they sometimes did not return to correct size after the keyboard was dismissed.
- The function browser now collapses sections to make it easier to find the appropriate one.
In addition a number of string functions and features were added:
- Newlines are now allowed in double quoted strings.
- If a formula starts with the single quote comment character, everything following it is assumed to consist of a single string, rather than just a comment.
- The addition operator “+” can be used to concatenate strings.
- Comparison and logical functions can now work with strings. An empty string is considered false.
- {fmt f, x} - Formats a number x, using the format string f.
- {join s, sep} - Joins the elements of string array s into a single string, with the elements separated by the scalar string sep.
- {match rx, s} - A regular expression search is performed on the elements of s using the regular expression rx
- {replace rm, rr, s} - A regular expression replacement is performed on the elements of s using the regular expression rm to match and rr to replace.
- {lowercase s} - A string is returned where all the uppercase characters of s have been replaced with their lowercase equivalents.
{uppercase s} - A string is returned where all the lowercase characters of s have been replaced with their uppercase equivalents.
A new Formula.Strings model, with a number of string function examples, has been added to the Getting Started session.
Math Minion on the Mac!
Version 1.3 arrives for both iOS and the Mac
I know it must seem like not much has been happening on the Math Minion front, but the delay was the result of a port of the minion to the Mac.
Version 1.3 for both Mac and iOS has just been released to their respective App stores and the cool thing is that the versions are not only completely compatible, they can both share the same iCloud sessions. If you have a Mac, being able to make changes on your phone, pad or computer and have them quickly reflected on all your other devices is very cool.
You can check out the screenshots and Mac manual on the Math Minion website.
If you don’t have a Mac, this won’t exactly be exciting, but the iOS version benefits from many internal improvements related to the Mac port. Most of these will not be noticeable, but should help with maintainability etc. A few visible changes are also present:
- Improved formula error messages. Previously some formula syntax errors related to units would not produce an error, but the formula would not calculate a result. This has been addressed and errors now report the full object path of the formula which caused the error.
- Formulas which had operators with no spaces followed by a space and an unquoted unit (such as 20/2 mm), would simply ignore the unit. It now produces a syntax error.
- Added missing up down hands to graph table when it is larger than the available view area.
- Fixes to the editing of unit sets.
- Unit dimensions for Resistance were wrong for the Pure_SI unit set.
- Optimizations for iPad retina display.
New and Revised Examples
I have added an example which uses the ordinary differential equation (ODE) tool to simulate the classic predator/prey relationship as characterized by the Lotka-Volterra model.
The fanning friction factor example has also been updated to use the new iterator tool, rather than the work around using the ODE tool.
Please see the the examples page for details and downloads
Improved graph labels in 1.2.1
A minor update (version 1.2.1) has just made it to the App Store.
Now if graph axis formulas have comments (text following a single quote), they will be used for axis labels instead of the whole formula. If a comment is not present, the formula will still be used as the label.
There are also some minor changes to iterate, solver and optimizer to improve behaviour for nested operations.
Version 1.2 Arrives
Version 1.2 is now ready and its main claim to minor fame is the introduction of an iterator tool.
Because of its array and matrix handling, combined with its solvers and optimizer, I thought an iterator would not be needed in Math Minion. However there are still situations, such as case studies, where it can be useful. This could be faked before with the ODE Solver, but this new object is much simpler and more appropriate for the task. You can kind of think of it as a sort of “for loop” for the minion.
Other changes for version 1.2 include:
- New “and” and “or” functions, which prove to be very handy.
- Fixed a bug where non-ascii characters in notes etc., could cause a crash.
- A particularly devious bug that was causing rare crashes was cornered and squashed.
- Added the formulas of recorded values to the ODE report.
- When the calculation status view is visible, equation solver updates are now only updated every second. This is also the case for the new iterator object.
- Some minor polishing here and there, including some additions to the Getting Started case.
Plotting Circles?
A recent one star review of Math Minion appeared in the US store, with the entire entry being:
“Can’t Plot a circle”
As you can see from the image above, Math Minion can indeed plot circles, so one is left wondering what problem this person encountered. For a developer, this is a huge problem with the App Store reviews, for you can’t ask for, or provide, any clarification. The best I can do is provide some sort of feedback here and given that I recently had an unrelated question about plotting circles, it seemed worth posting this note, which is essentially my reply to that question.
I have created a session called circles that you can find at:
Circles
If you browse to that link in Safari on an iOS device with Math Minion on it, the session should open automatically in Math Minion. The descriptions below refer to that session.
The easiest way to draw a circle is using the sine and cosine functions and that is what I have done for the “plot” graph. First a range of angles is calculated in “theta” as:
0:360*1”degree”
with this and “r” defined as 10, then “x” becomes:
r*{cos theta}
and “y”: becomes
r*{sin theta}
and plotting those values will give the circle.
It is also possible to plot the circle using the two solutions to:
y = (+/-) (r^2 - x^2)^0.5
but it is slightly trickier. First I generate a series of points in “points” as:
0:100/100
which will give 0, 0.01, 0.02…0.98,0.99,1.0
Using this I can generate a range of x values from -r to r with the formula in “x2”:
-r + 2*r*points
With this, the positive values of y are calculated in “y2”:
(r^2 - x2^2)^0.5
but that is only half the circle. In order to get the other half, I generated matrices x2plot and y2plot that each have two columns. The graph object of Math Minion will accept matrices as x and y values and will plot the values by column. For “x2plot”, we just want the second column to be a copy of “x2” and this is generated by:
x2*{transpose {concat 1,1}}
and the second column for “y2plot” is the negative of “y2”:
y2*{transpose {concat 1,-1}}
The “plot2” object displays the plot of x2plot vs y2plot.
Note that in both plots I made the y scale 1.25 times bigger than the x scale so the circle would not look squashed. This will work for the pop up windows on the iPad as well as full screen portrait orientation and portrait orientation for the iPhone and iPod touch. Landscape when full screen on the iPad or landscape on the iPhone and iPod touch will require different scales inorder to make the circle circular. Having the x scale about 1.5 times the y scale will work on the iPad, while 2 times the y scale will be required on the smaller devices.
New Tutorials
A couple of tutorials have been added to the website. These are introductory tutorials and intended to introduce the basic skills needed for simple calculations and for browsing the Getting Started session, where more complex concepts are described.
Also, an example of using a Math Minion matrix object to calculate a series expansion, in this case Taylor series, has also been added to the examples page.
The Minion on iCloud
Math Minion 1.1 has been approved and should be filtering into the App Store as I write this. The big news for this version is that Math Minion now supports iCloud document handling.
Implementing this turned out to be a bit more involved than I expected, but the results are definitely worth it, if you have more than one device running Math Minion. Do some work on your iPad and then later grab your iPhone and the changes are just there. A little more Apple magic.
However if you are paranoid like me, you might want to keep a copy of anything really important on Dropbox as well, which is still supported of course.
Math Minion will have iCloud document handling turned off by default, but there are instructions in the revsion notes and the help for turning it on (essentially go to the settings app and turn it on under the Math Minion entry).
There are other improvements in version 1.1 as well:
- Centred names in diagram icons.
- Rearranged rename view so cancel and done buttons will appear on iPhone/iPod in landscape mode.
- Improved ability to stop ODE solver
- Improvements to pasting tables of numbers - allow multiple spaces or other white space between numbers.
- Fixed a problem where renaming a row in a model array would overwrite a formula with the new name.
- Turned off the disabling of the solver when the number of outputs change.
- Improved the iteration display for nested iterative calculations.
- Improvements to undo/redo.
Setting the Minion Free
Alas, sales of Math Minion have not exactly been robust to this point. Of course I think it is a great tool and would like to see more people using it, so I have decided I might as well make it free, at least for the time being. Hopefully that will tempt more folks to at least give it a try.
The change has already been made as I write this, but it may take a few hours for the changes to migrate through the App stores.
I have also just submitted another minor update to the App Store. The revisions for version 1.0.3 are:
- Added a factorial function.
- Increased display cell width so numbers 1e100 and larger are displayed properly.
- Changed font spacing for object names on the diagram - should be more accurate in resizing them now.
- Fixed a problem where a plot might not update correctly, when a new record was added to a model array.
- Added additional checks to trig and log functions to ensure their arguments are dimensionless.
The new graph styles on an iPhone
This is just a tiny update, but since I’m not exactly overwhelmed with support issues, I thought I might as well submit it anyway. It should turn up next week.
Also just a reminder (plea?) that any and all feedback is welcome, either here or from my contact me page.
The changes for 1.0.2:
- Added date as a time unit.
- Added bar and bar with dot line types to the graph, where in this case a bar is a vertical line to zero.
- Fixed problem with daylight savings time and time functions.