Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2007 May 9

From Wikipedia, the free encyclopedia
Mathematics desk
< May 8 << Apr | May | Jun >> May 10 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


May 9

[edit]

Maple, matlab, mathematica

[edit]

All are available to me from my employer but graduated in 1964 I am scared of modern computer packages.

Question 1: can these packages produce the graphs of the following functions (standard approximations of delta-function) within the same coordinate system and save the results as jpg-files ready for Latex?

(a) sin nx/pi x for n=1,2,3.
(b) n/(pi+pi n^2x^2) for n=1,2,3.
(c) f(x)=-n if -1/n<x<1/n, f(x)=3n if 1/n<x<2/n, f(x)=0 otherwise, and g(x) defined in a similar way.

Question 2: Can they produce the vector field in a jpg-file if f(x,y) is given?

Thank you in advance for your help so that I can pick one of them to learn. Hopefully the learning curve is acceptable. Twma 05:17, 9 May 2007 (UTC)[reply]

I believe the answer to the first question is an unequivocal "yes" for all packages. I am fairly confident that the answer to the second question is "yes" for all packages as well. —The preceding unsigned comment was added by 149.135.123.6 (talk) 12:29, 9 May 2007 (UTC).[reply]
A somewhat simpler (and free) alternative that you might find sufficient is Gnuplot: it can certainly generate your #1 plots, and if you mean a vector-valued for #2 it can do that too. Otherwise I guess you mean to plot the gradient field, which I think would require either some (probably trivial) preprocessing in a language like Perl, or the use of a more capable math system like the ones you name. I also note that EPS files are in many cases more convenient for use with LaTeX and are in almost all mathematical-plotting cases of better quality than JPG images; I know that Mathematica and Gnuplot can make them, and I suspect that the others can as well. --Tardis 13:24, 9 May 2007 (UTC)[reply]

For mathematica...

Vector field http://mathworld.wolfram.com/VectorField.html
Basic Plots http://library.wolfram.com/howtos/plots/
If you can get Mathematica for free from your employer then grab it. It's worth $2450 on the free market.
202.168.50.40 23:04, 9 May 2007 (UTC)[reply]

It looks like that I should pick mathematica although (202.168.50.40) did not say that it can handle (1c). Thank you all but I shall come to check if there is any support for the other two packages. Twma 06:00, 10 May 2007 (UTC)[reply]

As others have said, MATLAB, Maple, and Mathematica can all handle the tasks you describe with little difficulty (for you or the program). However, they have different strengths. You may find this comparison helpful; Problem 4 illustrates basic plotting. (Or search the web.) If your interest is primarily numerical calculation, especially with matrices, MATLAB is an excellent, efficient, and common tool. If you wish to do symbolic computations, MATLAB alone will not do the job; but it can interface with Maple. Maple and Mathematica are both enormously powerful (and big) programs, capable of symbolic as well as numerical caculations. The design of Maple is more disciplined, while Mathematica is highly flexible but harder to control. All three of these are programmable. For plotting alone, gnuplot is a strong choice; however, it's awkward for implicit functions, where GrafEq excels. Also, Bill Casselman shows you how to make nice illustrations by programming PostScript, if you have the temperament. And there are other choices; in closing I must mention Wikipedia:How to create graphs for Wikipedia articles. --KSmrqT 09:54, 10 May 2007 (UTC)[reply]

Thanks to KSmrq. Twma 07:12, 11 May 2007 (UTC)[reply]