MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf ·...

16
A Usability Comparison By Brian Tucker MathCAD VS MATLAB

Transcript of MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf ·...

Page 1: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 1

A Usability Comparison

By Brian Tucker

MathCAD VS

MATLAB

Page 2: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 2

Table of Contents

Introduction .................................................................................................................................................. 3

Methodology ................................................................................................................................................. 3

Tasks ...................................................................................................................................................... 3

Test Environment .................................................................................................................................. 3

Evaluative Criteria/Rating Scale ............................................................................................................ 4

Results ........................................................................................................................................................... 4

Task 1: Perform Basic Computations .................................................................................................... 4

Task 2: Perform Integration and Differentiation .................................................................................. 5

Task 3: Take the Laplace and Inverse Laplace Transform of a Function ............................................... 6

Task 4: Solve a Differential Equation .................................................................................................... 7

Task 5: Plot a Simple Function .............................................................................................................. 8

Task 6: Plot the Frequency Response of a Filter Given its Transfer Function ..................................... 10

Task 7: Plot a Signal Containing Dirac Deltas and Heaviside Step Functions ...................................... 11

Task 8: Plot the Output of a Filter Given a Specific Input Function .................................................... 13

Task 9: Plot the Fourier Series Approximation of a Function ............................................................. 15

Findings & Recommendations .................................................................................................................... 16

Page 3: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 3

Introduction

This white paper discusses the results of a usability comparison between two computation tools popular amongst engineers: MathCAD and MATLAB. The user identified for this comparison is an individual with a solid foundation in engineering mathematics and the use of common computer programs such as Microsoft Word, as well as a basic understanding of coding in any language. All usability tests were conducted by myself with the goal of providing a quantitative analysis of the strengths and weaknesses of both programs from the perspective of a new user.

Methodology

Tasks

Perform basic computations Perform integration and differentiation Take the Laplace and inverse Laplace transform of a function Solve a differential equation Plot a simple function Plot the frequency response of a filter given its transfer function Plot a signal containing Dirac deltas and Heaviside step functions Plot the output of a filter given a specific input function Plot the Fourier series approximation of a function

Test Environment Relevant System Specifications: OS: Windows 7 64-bit CPU: Intel Core i5-3570K @ 3.4 GHz RAM: 8 GB Software Versions Used: MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop computer in a quiet room. Tests were conducted from 11 April to 18 April, 2015.

Page 4: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 4

Evaluative Criteria/Rating Scale Each task was evaluated based on confidence in the results, readability, and ease of use. The following Likert scales were used to quantify the user experience in each of these three categories: How confident do you feel in the results provided by the program?

No Doubt Very Confident Confident Likely Error Not Correct

4 3 2 1 0

How well could someone untrained in the program follow your process?

Very Well Well With Effort With Help Could Not

4 3 2 1 0

How easy did the program make it to complete the task?

Very Easy Easy Needed Help No Built-in Support

Could Not

4 3 2 1 0

Results

Task 1: Perform Basic Computations MathCAD: All that was required to perform a basic arithmetic calculation in MathCAD was to type in the equation and press the 'equal' key on the keyboard. The equation was presented as it would appear in a textbook, and the result was calculated correctly.

Result Confidence: 4 Readability: 4 Ease of Use: 4

Page 5: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 5

MATLAB: It was similarly simple to perform a basic calculation using MATLAB. However, the actual calculation was not as readable, and the result appeared in a separate area of the program window rather than next to the equation. In addition, adding an equal sign to the end of the equation expecting the program to display the calculated value there actually resulted in a somewhat obtuse error message.

Result Confidence: 4 Readability: 3 Ease of Use: 3 Task 2: Perform Integration and Differentiation MathCAD: It was easy to locate the integration operator in MathCAD due to the well-labeled menu bar, and the error message that appeared when attempting to evaluate an indefinite integral was helpful in identifying the issue and correcting it. Taking the definite integral was as simple as performing a basic computation, and in both cases the math once again appeared as one would expect it to in a textbook. Taking the derivative of a function worked the same way and was equally intuitive. Result Confidence: 4 Readability: 4 Ease of Use: 4

Page 6: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 6

MATLAB: As MATLAB is a command-based program, it was not as simple to perform integration and differentiation. Attempting to type 'integral' and other similar commands followed by a function returned various cryptic error messages. Ultimately, a Google search was needed to find the correct syntax and command. Luckily, MATLAB has an extensive web database containing helpful examples of correct syntax for a wide variety of commands. However, the results were still not very readable and the keyword 'int' does not make it very clear that an integration is being performed. Result Confidence: 4 Readability: 2 Ease of Use: 2 Task 3: Take the Laplace and Inverse Laplace Transform of a Function MathCAD: Once again, MathCAD made it very intuitive to take the Laplace and inverse Laplace transform of a variety of functions, and the results it provided were accurate and highly readable. Result Confidence: 4 Readability: 4 Ease of Use: 4 MATLAB: MATLAB performed the Laplace and inverse Laplace transform ably, although I did still need to look up the proper commands and syntax. However, I found myself growing more familiar with how MATLAB handled symbolic evaluations as I progressed through the tests, which made it easier to accomplish this task. In addition, MATLAB automatically converted variables to ‘s’ and ‘t’ when operating in the Laplace and time domain respectively, improving readability of the results. Result Confidence: 4 Readability: 3 Ease of Use: 3

Page 7: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 7

Task 4: Solve a Differential Equation MathCAD: This task marked the first time I had to consult outside reference materials for help with MathCAD. Unfortunately, MathCAD does not have the same level of support as MATLAB, with simple forum posts being the only available aid. All of these forum posts indicated that MathCAD is unable to symbolically solve differential equations. It would be possible to solve differential equations manually using Laplace transforms, but at that point result confidence would be greatly decreased, as would readability and ease of use. Result Confidence: 1 Readability: 0 Ease of Use: 1 MATLAB: MATLAB’s documentation again made it relatively simple to solve a differential equation symbolically. However, the syntax for the command is somewhat strange and even with the help of the online documentation it took some trial and error to get the function to execute. Once it did, however, MATLAB calculated the result quickly and correctly, though readability was still somewhat poor.

Result Confidence: 4 Readability: 2 Ease of Use: 2

Page 8: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 8

Task 5: Plot a Simple Function MathCAD: MathCAD excelled in plotting a simple function and made it simple to modify the plot as desired with its understandable interface. The plot was also displayed in a very readable way, with the function displayed next to the graph for easy reference. However, MathCAD did not offer any way to actually label the graph, decreasing readability.

Result Confidence: 4 Readability: 3 Ease of Use: 4

Page 9: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 9

MATLAB: MATLAB did not make it as straightforward to perform a simple plot as MathCAD. One thing that was not made apparent in either the program or online documentation was that the independent variable must be defined as a range of values, unlike in MathCAD where the program automatically does this when plotting. In addition, the plot itself was displayed in a new window which appeared after the MATLAB program was ran, slightly decreasing its ease of use. However, MATLAB did offer a way to add both a title and axes labels to the graph, aiding readability.

Result Confidence: 4 Readability: 4 Ease of Use: 2

Page 10: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 10

Task 6: Plot the Frequency Response of a Filter Given its Transfer Function

MathCAD: MathCAD did not make it easy to graph the Frequency Response (Bode plot) of a function. There was no built-in functionality for this task, and as a result the magnitude and phase response for the transfer function were calculated manually. While not overly difficult, this did reduce result confidence and readability.

Result Confidence: 2 Readability: 2 Ease of Use: 1

Page 11: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 11

MATLAB: MATLAB proved very capable at taking the Bode plot of a given transfer function using the online documentation. No manual calculation was needed, and the ‘bode’ command automatically produced a plot of the magnitude and phase response for the given transfer function. However, ease of use was somewhat diminished by having to convert the transfer function into two variables containing the coefficients of the numerator and denominator.

Result Confidence: 4 Readability: 4 Ease of Use: 3 Task 7: Plot a Signal Containing Dirac Deltas and Heaviside Step Functions MathCAD: Unfortunately, MathCAD proved unable to plot the Dirac delta function no matter what syntax was used. Attempting to work around this by defining the Dirac delta as the derivative of the Heaviside step function also failed to produce the proper plot. Result Confidence: 0 Readability: 0 Ease of Use: 0

Page 12: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 12

MATLAB: MATLAB also failed to plot the Dirac delta function. However, due to MATLAB’s coding-based nature it was possible to manually define the delta function and plot the signal that way. Readability and ease of use both suffered due to this, however, and the user-defined function may not hold up well to extensive mathematical manipulation, decreasing result confidence.

Result Confidence: 2 Readability: 0 Ease of Use: 1

Page 13: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 13

Task 8: Plot the Output of a Filter Given a Specific Input Function MathCAD: Again, MathCAD did not have any built-in support to help accomplish this task. In order to plot the output of a filter defined by a transfer function, the input was split into its individual components based on frequency, and each component was then multiplied by the magnitude of the transfer function evaluated at that frequency.

Result Confidence: 3 Readability: 2 Ease of Use: 1

Page 14: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 14

MATLAB: MATLAB had a variety of built-in options to assist with this task, and the online documentation proved helpful in guiding me through the needed steps to plot the output of the filter. However, MATLAB does not make it clear that the ‘filter’ command is meant to simulate a digital filter which samples the output only at integer values. This ambiguity did cause some confusion as the plot of the output was nothing like what I expected to see. After reading through the online documentation more, however, I was able to resolve the issue and MATLAB produced a very readable plot of both the input and output for the defined filter.

Result Confidence: 4 Readability: 4 Ease of Use: 2

Page 15: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 15

Task 9: Plot the Fourier Series Approximation of a Function MathCAD: MathCAD was not capable of automatically finding the Fourier series approximation of a given input function. I calculated the approximation manually and was able to plot this fairly easily using MathCAD’s built-in summation function.

Result Confidence: 3 Readability: 4 Ease of Use: 1 MATLAB: MATLAB also did not have any way to automatically calculate the Fourier series approximation. In addition, there was no easy-to-use summation command which produced the desired results. Ultimately, I ended up having to use a ‘for’ loop to correctly calculate and plot the Fourier series, greatly reducing the readability of my program and introducing potential errors due to coding. Result Confidence: 2 Readability: 0 Ease of Use: 1

Page 16: MathCAD VS MATLAB - Weeblybriantucker-portfolio.weebly.com/uploads/5/2/5/4/52542021/project4.pdf · MathCAD Prime 3.0 MATLAB R2014b All tests were performed on a personal desktop

P a g e | 16

Findings & Recommendations

Whether MathCAD or MATLAB is the right tool for you will largely depend on your priorities as the user. From a pure usability standpoint, MathCAD is the clear winner. In addition, if you need to present your problem solving process to someone unfamiliar with MathCAD or MATLAB, they will likely have an easier time understanding computations done through MathCAD. However, one cannot deny that MATLAB is the more powerful and flexible tool if you are willing to put in the time to learn it. If pure number crunching and accuracy of results are your top concern, MATLAB will likely serve you better than MathCAD. Finally, MATLAB does offer several unique built-in functions in areas such as signal analysis which make it a far superior alternative to MathCAD if you are specializing in one of these fields.

0

10

20

30

40

50

60

70

80

90

100

Result Confidence Readability Ease of Use

Point Breakdown as Percentages

MathCAD MATLAB