4.0

4.0 | 1 rating Rate this file 24 downloads (last 30 days) File Size: 311.76 KB File ID: #22081

Mathieu Functions Toolbox v.1.0

by E. Cojocaru

 

13 Nov 2008

Code covered by the BSD License  

elliptical cylinder coordinates, special functions, angular and radial Mathieu functions

Download Now | Watch this File

File Information
Description

The Mathieu functions are used to solve analytically some problems in elliptical cylinder coordinates. The computational toolbox includes routines for the characteristic values, the expansion coefficients, and the four categories of angular and radial Mathieu functions together with their derivatives: even-even, even-odd, odd-even, and odd-odd. Example files are included. All relations are given explicitly in the documentation file, in pdf format. Tables of numerical values are included in the pdf file. Revisions are specified in the readme file.

MATLAB release MATLAB 6.5 (R13)
Zip File Content  
Other Files
Cpm.m,
dHpm1.m,
dHpm2.m,
dJpm.m,
documentation.pdf,
dSpm.m,
dYpm.m,
eig_Spm.m,
example1_Jpm.m,
example1_Spm.m,
example2_Jpm.m,
example2_Spm.m,
extract_one_column.m,
extract_one_value.m,
gpm.m,
Hpm1.m,
Hpm2.m,
Jpm.m,
Npm.m,
Readme.txt,
Spm.m,
Ypm.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
15 Nov 2008 John D'Errico

Pretty good. A useful set of tools, at least if you work with these functions. A few things the author should consider improving.

1. There are no H1 lines. For example, in the help for Ypm, the first two lines of the help are:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% RADIAL MATHIEU FUNCTION OF THE SECOND KIND

Note that the SECOND line of the help was a nice, one line description of the function. It would do very nicely for an H1 line, except it is the SECOND line. Why is an H1 line valuable? Suppose you want to remember the name of this function next year, and your memory is slipping like mine does at times. You might try the lookfor utility. You might type this in MATLAB:

lookfor mathieu

It would return nothing, since the author failed to provide H1 lines for these tools.

Delete that meaningless line of all % symbols, and this code would be more useful.

2. It is a good idea to use mlint on your code. It points out the failure by the author to preallocate some variables, then growing them dynamically in the code. This is inefficient.

3. There are no error checks on the variables. Be friendly to your users. If the argument q must be positive (see the help for Ypm) then test for that property. If this test fails, then return an error that indicates what failed and why. Similarly, if KF can take on only one of the values {1, 2, 3, 4}, then test for that fact. Don't just crap out with some random error, or return a garbage result. Be friendly to those who use your code.

4. Internal comments are valuable, both to those who read your code as well as yourself as the author. Next year when you need to fix a bug in your code, those comments would have been helpful. Learn to comment your code. A great goal to look towards is one line of comment for every line of code. I'll consider you a success if you do half that.

5. The help could be a bit more friendly. For example, Cpm is described as no more than "Correlation factor". Correlation of what?

There were some things I really did like. I found a very useful .pdf file. Well done there. I found examples of the use of these functions, and useful comments in the examples.

I wanted to rate this submission as 3.5 stars. Some might choose to round that up to a 4, others might see those flaws I've pointed out as more important and round it down to a 3. With many misgivings, I've chosen to round this one up to a 4.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
mathematics Cristina McIntire 13 Nov 2008 15:53:49
elliptical cylinder Cristina McIntire 13 Nov 2008 15:54:53
mathematics E. Cojocaru 13 Nov 2008 15:55:03
special functions E. Cojocaru 13 Nov 2008 15:55:03
angular mathieu functions Cristina McIntire 05 Feb 2009 13:37:50
radial mathieu functions Cristina McIntire 05 Feb 2009 13:37:51
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com