Mac Dude

1551 Reputation

17 Badges

12 years, 125 days

MaplePrimes Activity


These are answers submitted by Mac Dude

Chances are your file got created just fine with the first attempt. But you do not know where it got created. To find out, use currentdir(), which will print the present default directory where Maple will search for files and will write files. In my case, for a new worksheet, I get this:

currentdir();

             "/Library/Frameworks/Maple.framework/Versions/15/bin.APPLE_UNIVERSAL_OSX"

check there & you will find the file...

M. D.

You can use ExportMatrix or ExportVector to save the data you really care about in a file, to be read back in upon your next run.

AFAIK the variable data cannot be preserved in a sheet across closing the sheet and reopening it.

M.D.

MathType can also accept LaTeX or TeX input. You can try

latex(expression);

and see whether that one works. I have used Maple output in actual LaTeX documents and, while not the prettiest as far as the code is concerned, it did produce a useable output.

M.D.

Your first stop should be the help pages, specifically this one.

Matlab[FromMatlab] - translate a MATLAB(R) expression to Maple

Don't expect to just run your program through this and have a running Maple program. I have never tried the Matlab conversion, but I have tried the Mathematica conversion, and the result was less than thrilling. Your best bet is to translate them in small chunks, verifying the Maple code does what you want it to. As far as I can tell your Matlab code is relatively straightforward so you should not have too many Matlab constructs that you cannot translate to Maple directly (that was one of my issues with the Mathematica code I converted).

One thing to look out for is that Maple does algebra when it can: in a loop it may merrily try to build up a huge expression only to run out of memory eventually. You use strategically placed eval statements to prevent that, and you can allocate Matrices, Vectors and Arrays with datatype=float so you get an error if Maple tries to assign a non-numerical value.

Now, you did not expect us to actually do the conversion for you, didn't you??

Mac Dude.

Index page to Darin Ohashi's posts on the subject.

http://www.mapleprimes.com/posts/200184-Parallel-Programming-Contents-Page

Mac Dude

There are two things worth trying:

After selecting a plot (make sure you select the plot and not the data [which you see by lots of blue-ish markers upon the selecting click]) you can export it from the Plot menu and pick a format. You may want to try the eps format (encapsulated Postscript). I have done that before and it often works.

However, it seems like your editor wants to have a vector-graphics version of the plot (strings remains strings etc.). If the export above does not do that (and I have never tried to edit one) then you can try to plot to a ps file directly using plotsetup. It allows you to redirect a plot from the screen to a file in the specifie format.

If that dos not work either you may have to revert to external plotting using e.g. gnuplot.

M.D>

 

Being  a Mackie I cannot comment on Windows specifica, but I have seen similar things happening on OS X; esp on 32-bit versions on PPC.

32 bit systems in general don't allow more than 2 GB per process (and likely this includes some system overhead). If your numbers are given by Maple directly (e.g. by the ticker at thebottom) the process likely allocates or uses more than what is shown (certainly that is the case in OS X). Then there is the GUI process which in itself can run up to GB size esp. when doing large plots, and its memory is definitely not included in the ticker readout. However, the GUI memory consumption does not count against the limit on the mapleserver process as they are separate (and I assume here Maple uses the same client-server model in Windows as it does in OS X). If you can, check what the GUI process is doing (on OSX Maple18 would be the GUI whereas mserver is the Maple kernel, the process that crunches the numbers).

So it seems like you are running into memory limits. Just adding RAM sticks may help, but I would doubt it. I think you want a 64 bit setup AND more physical RAM. I certainly see less of such issues on my OS X 10.6 64bit setup than on my 32 bit setup.

Having said that, I do find the GUI process flaky in general and some worksheets just stress it for no obvious reason. My usual defense is to avoid plotting (which helps) or to fine tune the number of points used in a plot (helps also).

I have had thoughts about checking and increasing the heap space for the Java process that runs the GUI. But I haven't figured out yet where I can insert the relevant cmd-line switches.

Mac Dude

I am making the bold assumption that you are looking for Gaussian-distributed random numbers. In that case, look at

Statistics[Sample]

in the help files. This will allow you to generate random numbers with a pdf (probability density function) you can specify. It is a bit of a chore to setup but once you get through that you should be getting what you want.

Mac Dude.

PS: This mechanism works for many other than Gaussian pdfs as well. But for many pdfs, concepts like standard deviation are not (or not well) defined and one uses other measures to quantify the pdf.

Statistics[PieChart] - generate pie charts (copy form the online help page)

This should get you going.

M.D.

 

You can use sections and subsections (both of which are collapsible to hide what is in them) to hide irrelevant details, or whatever it is you want to hide. Using a colon (:) at the end of a statement hides its output, sometimes that helps already.

As far as presentation is concerned, if you don't want to or can't give out the whole sheet, consider printing the thing to a pdf and play that. If you evaluate the sheet first, then hide the sections to be hidden and add strategically placed page breaks you should end up with a pdf that is readable. Recalculation of the whole sheet expands the sections. (Disclaimer: I don't use the classic interface so I don't whether these sections exist there). You may even be able to actually remove statements and their output except then the sheet won't recalculate the next time.

Then there is this new Maple WWW software that may help here. But it does seem to give away the worksheet. Check here under Recent Posts.

I would like to know how to convert between worksheet and document mode as well. I do think you can create document blocks in a worksheet-mode sheet as well but you'll need to RTFM for that as I don't know it. I use document mode with 2d math when producing sheets I want to distribute or use in presentations.

Mac Dude.

 

 

ExcelTools:-Import.

I have never used it, but it seems fairly straightforward. Once you have the Array you can do whatever you need to with it.

RTFM.

Or am I missing something here?

Mac Dude

 

Well, you certainly have a typo in the last line, and you have only 2 indices where you need 3.

M.D.

You can use plots:-textplot to anotate points. To set the plotting symbols use the symbol option (e.g. symbol=solidcircle). The help facility explains it all rather well (look for "plot/options" to fix up the appearance of your plot, look for "plots" to find out about the different ways to plot).

M.D.

 

While I am not quite sure what exactly you want to achieve, here is how I am exportig Maple plots to LaTeX:

I first setup the plot in Maple the way I want it (specifically, fonts and size of the axis labels). I then export to a png file, followed by conversion to EPSF in a separate program (I happen to use GraphicConverter on a Mac, but that is just one of many that can do this). I then import the .eps file into the LaTeX document using graphicx just like you are doing above.

It is not optimal, but I have had trouble with .eps files from Maple not being readable. So I have given up on them. You may not be happy with the resolution you get with my method; the next step would be to plot to a file the way you do it in your example. I am fairly certain you can chose the resolution of the .png (I think you can spec. the number of pixels in either direction).

Per Wikipedia, psfrag needs a "tag" where to puts the new info. I assume in your case that would be the "x"; but I am not at all sure what it ends up as once Maple is through with it (this would have to be the variable label Maple puts at the bottom of the plot).

I typically typeset with the times package. If you then use Times as font for the axis labels they should be pretty close in appearance. Personally I don't do that but use Palatino for the graphs as it comes out more readable.

Mac Dude.

First, assess whether a complex solution indeed makes sense. This depends more on the physics of your problem than on the math. If a complex solution does make sense, then you should know which part you are interested in and you'd plot that. You can of course plot both in a 3-d kind of arrangement. Plotting the real part or the modulus just because they are real and thus amenable to a 2-d plot is not likely to be correct.

Without knowing the nature of your problem one cannot be more specific. Check my first question and, if complex is indeed a reasonable answer, provide more details.

M.D.

First 14 15 16 17 18 19 20 Page 16 of 20