Home
Archives
About us...
Advertising
Contacts
Site Map
 

ruby in steel

 

programming Mathcad 13
Mathsoft / Adept Scientific plc
http://www.mathcad.com / http://www.adeptscience.co.uk/
math/engineering software
$1195 / £665 ex. VAT
Upgrade licences from previous versions are available.


mathcad 13

I remember the day I got my first slide rule: a small cheap plastic thing bought from a junk shop. It was more than a bit beyond my mathematical prowess at the time – I was only ten, and hadn’t a clue what a logarithm was, let alone a trigonometric function. But, hey, it was fun to play with!

Unlike my little slide rule, Mathcad is a serious mathematical calculation tool aimed at engineers. With it, you can do in a few seconds what it would have taken a week to do with a PC a few years back. Or a year with a slide-rule. But I got the same feeling in using Mathcad as I did with the slide rule: fun to fool around with and capable of doing a lot more than I was.

Office Integration

Mathcad is often mentioned in same context as the other two symbolic mathematical systems, Maple and Mathematica. While it does a lot of the same things as Maple and Mathematica, it’s really quite a different beast. First, it’s aimed at engineers and those who need to document and annotate technical and engineering solutions. It runs on a Windows PC – there’s no pretence of running on a Mac or Linux – and it closely integrates into Office. Further, there’s a good implementation of OLE (Microsoft’s Object Linking and Embedding technology), particularly for Excel. When you embed or create an Excel spreadsheet in a Mathcad document, you’ll see the full Excel menu appear, overwriting the Mathcad main menu as you activate the Excel object.

mathcad
The Mathcad environment

However, in the initial release of Mathcad 13, this didn’t extend to other Office objects like Word and Access. While you could successfully embed Office objects (and type text into a Word object, say) you didn’t get Word or Access menus displayed. But with the recently released Service Pack, I’m happy to report that you can now type ‘War and Peace’ into a Word object embedded into a Mathcad worksheet. And format it.

Easy Does It

Mathcad is very easy to start working with. First off, there are some excellent Flash tutorials on the Mathcad website. These take you through the basics of entering a formula, doing a calculation, importing data and generally moving around. A picture is worth a thousand words: in this case, it’s true. I was up and running without having to open the help system once. It really is that simple.

The second reason why it’s easy to use is Mathcad’s ‘whiteboard’ concept. The best way of thinking about a Mathcad worksheet is like being in front of a whiteboard where you scribble out your equations. The whiteboard is mostly free format and you can position your equations more or less where you like. This differs from other techniques, particularly Mathematica’s rather clunky, to my mind, cell based approach. However, Maple 10 does have a similar whiteboard-style system.

Equally, the input format is mostly quite intuitive and quick to enter with the aid of simple floating palettes. I did, however, find it a bit tricky to enter the square root of minus 1. Every time I tried to enter i in a formula, Mathcad assumed it was a variable. It seems that you have to enter 1i (a number before the symbol) to get it to work. Confusingly, if the number is one, it disappears and you are left back with a plain i. One other minor quibble: you are limited to a single style of round parenthesis - no curlies or squares.

niggle
A minor niggle is having to enter a number before the i. Otherwise, Mathcad thinks it’s a variable.

The other thing I really liked was the graphing tool: it’s excellent - and intuitive, to boot. To plot a graph you click on the graph palette and plonk a graph object roughly where you want it; you can drag it around to where you really want it afterwards. When you’ve created the basic graph (2D in this case), you fill in two placeholders, say x on the x-axis and f(x) on the y-axis – and you’ve got your graph of f(x) against x. Now that is exactly what I want to do 99 times out of 100. It’s the way I think about graphs and, I suspect, the way most people (apart from professors of mathematics) do. To customise the graph further, you can adjust the axis limits (which are placeholders) or double click on the graph to get a complete customisation dialog box. Neat.

graph
Drawing a graph is very easy and really works the way that most people think about drawing graphs.

Number Crunching

But how did Mathcad cope with the real business of actually doing the math? There are three hundred built in functions to choose from, so these should cover most engineering requirements. In fact, the functions are mainly geared towards engineering and the more ‘practical’ aspects of mathematics. It doesn't have spherical harmonics for example (though, to be fair, Mathcad tells us that there are several ways around this limitation).

But for a truly difficult test, I threw my favourite ‘nasty’ integral at Mathcad. This is actually from a real life problem I came across in an argument about the performance of a telescope. The integral is a highly oscillatory Fresnel integral, and to be honest, I didn’t expect Mathcad to cope. Well, it didn’t. But it was in good company – neither did the considerably more expensive Maple. Mathematica was the only product of the three that actually came up with the goods (see The Bitwise review of Mathematica and Maple).

bessel
This type of integral is very difficult to deal with. Out of the three, Mathcad, Maple and Mathematica, only Mathematica did the business.

But apart from trick questions like the Fresnel integral, Mathcad generally performs absolutely solidly. It inverts matrices, solves differential equations and does symbolic mathematics – all the stuff you normally want to do.

Programming

Mathcad has a simple programming language. It’s so simple that it only has eight keywords or so, but that is quite sufficient to write scripts of reasonable complexity. However, I found it quite slow to use, mainly because I had to use the Programming Toolbar to do anything. Typically, you don’t type the keyword while, you select it from the Toolbar which creates placeholders for the keywords. I wouldn’t like to enter anything very complicated in it, such as adding spherical harmonics, for example. You could do it, but it might take some time.

programming
Programming Mathcad is very simple, but for anything complicated, it could take a long time to enter.

However, there’s also a ‘programmable interface’. With this, you can code the complicated stuff in C or C++ using algorithms from, say, ‘Numerical Recipes in C, Second Edition’. Just look up the relevant page (page 254 for spherical harmonics, if you are interested) and type it in.

Initially, this struck me as being slightly odd. There is a vast gulf between C/C++ and the ‘baby-talk’ programming of Mathcad. But on reflection, I decided that it wasn’t so dumb after all. Few people will code something like a spherical harmonic in script. It’s far quicker to copy it from a textbook like Numerical Recipes, test it independently and then package it as a DLL to be used from Mathcad.

But there’s another scripting tool available. In line with Mathcad’s Windows/Office approach, you can also use VBScript to hook up other ActiveX controls. If you wished, you could write a custom ActiveX control to perform mathematical or, particularly, database oriented applications. In conjunction with the Data Acquisition Control (DAC) – an ActiveX control that can connect to a hardware data logger (or similar) – you can write a pretty sophisticated data logger and processor for an engineering test bed. Write it quickly, too.

Traceability

Most engineers and scientists must have had the experience of staring at a number on a piece of paper and wondering “where on earth did I get that value from?” Usually six months after the event while you’re trying to explain some unfortunate mishap to your boss. It’s certainly happened to me. More than once.

To help with potentially embarrassing situations like this, Mathsoft has  built an ‘audit trail’ system into Mathcad. You can ‘annotate’ a worksheet, showing where the numbers came from. Further, you can create a ‘provenance’ audit-trail back through several worksheets for complex systems. I’m not sure it’s lawyer-proof, but it should help with figuring out how you got to a particular answer.

Summary

So how does Mathcad stack up against Mathematica and Maple? Well, in my view it isn’t in the same league. But then it isn’t intended to be. It costs a good bit less than Mathematica or Maple and is clearly aimed at the engineering community – not research scientists. Moreover, it’s embedded firmly in the Windows/Office automation environment with no pretence of portability. Consequently, for someone coming from a Microsoft Office background – word-processing and spreadsheets - it is much easier to use than Mathematica or Maple and is amazingly simple to integrate into Office documents.

A better comparison would be with Mathematica CalcCenter (see The Bitwise review). CalcCenter is a bit cheaper ($595 / £515 ex VAT at the time of writing); but if you are interested in Office integration, Mathcad is the better option. While it doesn’t have the same symbolic mathematical representation that CalcCenter has, its ease of use and flexibility make up for that. Underneath the covers, CalcCenter is a cut down Mathematica and works like its big brother; if you don’t like Mathematica, there’s a good chance you won’t get on with CalcCenter. On the other hand, Mathcad isn’t a cut down version of anything and its integration into the everyday Microsoft world is superb. If you need to get a practical solution to a real world problem, you might want to consider Mathcad.


Mathcad 13 :: System Requirements

  • Pentium/Celeron processor, 400 MHz or higher; 700+ MHz recommended
  • 256 MB of RAM; 512 MB or more recommended
  • 550 MB of hard disk space (250MB for Mathcad, 100MB for prerequisites, 200MB temporary space during installation)
  • Windows 2000 SP4, Windows XP SP2 or later
  • CD-ROM or DVD drive (for CD installation only)
  • SVGA or higher graphics card and monitor
  • Mouse or compatible pointing device

 

Dermot Hogan

June 2006

 


Home | Archives | Contacts

Copyright © 2006 Dark Neon Ltd. :: not to be reproduced without permission