Daniel Skoog

Daniel Skoog

1766 Reputation

22 Badges

13 years, 346 days

MaplePrimes Activity


These are answers submitted by Daniel Skoog

When buying a student license for Maple, some verification is typically required. A photo of your student id is usually enough as long as it contains your name, the name of your school, and a date showing that the document is currently valid (i.e. that you are currently enrolled).

If they have questions about this process, contact customer service at custservice@maplesoft.com.

HDF5 has come up a few times and is currently not supported in Maple. We do already have an internal SCR for adding this functionality, so you don't need to worry about adding another one.

Thanks,
Daniel

It sounds like what you are looking for is to make the math "non-exectuable". You can toggle the executability of math using the SHIFT + F5 hotkey. Once math is non-executable, you will notice that the bounding box around it will turn from blue to grey (this denotes that the math is no longer executed). Hope that helps.

As far as I can tell, there are two typos:

1) The file: Data.mpl should be named Data.mm

2) In the file Data.mpl, "exports" should be "export".

 

The package loads for me after fixing up those issues and changing the current directory to be the same as the location of the files (for Maple 2019 on Windows):

currentdir("C:\\Program Files\\Maple 2019\\samples\\ProgrammingGuide\\RandomnessTests\\");

read("C:\\Program Files\\Maple 2019\\samples\\ProgrammingGuide\\RandomnessTests\\RandomnessTests.mpl");

 

That being said, I have not tested any of the exports and reading in the mpl file does give a number of warnings for implicitly declared variables that should really be cleaned up if these are meant to serve as good examples.

I'll file a ticket for fixing up the two typos.

Export to the SVG file format is now available in Maple 2019. For more detail, see: ?Formats,SVG

Start-up code is not shared between worksheets in a workbook. You can however accomplish this in a couple of different ways. Personally, I would add a new "Maple Code Attachment" containing the code to the workbook, called "Startup.mpl" (or similar), and then have every one of the worksheets read in the "Startup.mpl" file in their respective start-up code, i.e.

read("this:///Startup.mpl"):

 

Another option would be to make all of the saved variables in the start-up code into saved variables in the workbook, which would then make them accessible to all worksheets in the workbook - though this could take a considerable amount of effort if there is a large number of variables in the start-up code. To do this, you would save or savelib the variables either one-by-one or in bulk into the workbook, or one-by-one using the workbook navigator window.

Hope this helps.

Why do you need to delete the variable each time?

It sounds more like you are just having an issue with the state of the documents. To explain, let's say you have a workbook with two documents that both refer to a saved workbook variable x with value 1. If you open either of the documents, then they open with x being assigned the value 1. If you change the value of x in either session to, say 2, and then save that value in either the workbook navigator tree or using:

savelib('x', "%PathToWorkBook%");

Then only the session where you changed the value, x, will have the new value. For the other document (or session), it will retain whatever state it was opened with (in this case, x = 1). If you open the second document after making the change to the saved variable, or if you do a restart in that other document, then it will get the updated value for x.

I hope that helps - let me know if you are trying to do something different.

 

You could start by using the CodeGeneration:-Python package to translate the Maple code to Python. You can also try out the code generation assistant in Maple by going to Tools - Assistants - Code Generation. You can also try to use the code generation assistant in the MapleCloud here: https://maple.cloud/app/6239780623876096/Code+Generation+Assistant

There's no way for any external language to access or control the Maple user interface. If you are interested in using Python code in Maple, then that is possible as of Maple 2018. See https://www.maplesoft.com/products/maple/new_features/Maple2018/Connectivity.aspx

As of Maple 2018, you can call Python code from inside of Maple. For more details see the what's new page for Connectivity.

The Export command should probably be able to handle this use case, but it seems like it doesn't. Here's something that you might try:

x := convert([seq(1..100)], Vector[column]):
y := 0.1*~x:
with(SignalProcessing):
tmp := GenerateGaussian(100, 2, .6):
tmp2 := convert(tmp*~y, Vector[column]):
ad1 := <<x>|<tmp2>>:
Export("exdat.csv",ad1);
PackageTools:-AddAttachment("this://","/DataFiles/exdat.csv"="exdat.csv");
FileTools:-Remove("exdat.csv");

 

This exports the file to disk, then adds that exported file as an attachment in the workbook. It then deletes the file it added to disk.

Another option you might look at is saving the matrix itself to the workbook. If you use:

savelib('ad1',"this://");

This will save the result of the matrix into the workbook itself, so that next time you open the workbook, you can see the value for ad1 just by typing in ad1. I have attached an example of this (and the other suggestion) to this post here: CSV.zip

The subsection option was removed in 2018.0. You can read more about it and other interface changes here:

https://www.maplesoft.com/products/maple/new_features/Maple2018/Interface.aspx

Since you can create a new "sub-section" by simply inserting a section inside of a section, we felt that it was redundant functionality and elected to remove it in order to simplify the interface.

In order to add an image to the plot in this application, I added a background image to the default plot (here's a page that describes the background image feature: https://www.maplesoft.com/support/help/Maple/view.aspx?path=updates/Maple18/BackgroundImages ). If you open the startup code (the gear icon on the toolbar) you will see the line:

p1:=plot([],axes=boxed, view=[-10..10,-10..10]);

If you modify this to include the path to an image, then you can use a background image:

p1:=plot([],background="this://rollercoaster.jpg",axes=boxed, view=[-10..10,-10..10]);

I have attached a copy of a Maple workbook that includes the image and the changed path: CollectingPoints.zip

Let me know if you have any questions.

Good question.

What's going on here is that there are two "versions" of version:

The Physics package has an export called Version. This corresponds to the date at which the Physics package was last built. You can see this using:

Physics:-Version()

To the best of my knowledge, no other Maple package (built-in or user authored) has implemented a similar Version command.

 

The second version is the upload version in the cloud. Whenever an application or package is updated in the MapleCloud, there is an attribute that is updated which denotes how many times that content has been updated. At the time of this writing in the case of the Physics package, there has been 38 uploaded "versions" for the Physics package.

You can see this using:

PackageTools:-GetProperty("5137472255164416",version);

This version attribute is something that every MapleCloud package has. You can query the other MapleCloud packages in a similar manner as I described in the code directly above, namely by getting the property of the unique identifying number of the package in the Cloud.

Since you did state that the list will increase to a point and then decrease (thus avoiding any issues with multiple max values), the index option for the max or min commands should help here. The max[index] command returns the index position for the maximal value in a list. For example,

l:=[1,4,7,4,2,1]:
max[index](l);

This returns 3.

Thus in order to return the list of values up to and including the max value, index the original list by the following:

l[1..max[index](l)]
 
1 2 3 4 5 6 7 Last Page 1 of 12