AmusingYeti

165 Reputation

8 Badges

9 years, 190 days

MaplePrimes Activity


These are replies submitted by AmusingYeti

@Markiyan Hirnyk 

Perhaps he is busy fixing all of those issues you so kindly pointed out. Afterall, he and the Maple team should devote every minute of their lives perfecting Maple. Maths should never, ever be used in the context of recreation, as it is very serious business...

-Yeti

@tomleslie 

Apparently I am the one missing a functioning brain. That seems to do the trick. A lesson I need to learn, do not always stick together parts of other codes to form a new one, because I am too lazy to just write it from scratch.

-Yeti

@Rouben Rostamian  

Thank you. This will offer a good starting point for me to expand upon for my problem.

- Yeti

@acer 

I tried this, but the issue is the printing syntax used by CodeGeneration. For example, translating the matrix elements from the example above results in the following:

cg = x ** 2

cg0 = x ** z

cg1 = z ** 12

cg2 = 2 * x

cg3 = 5 ** y

cg4 = 6

Then in order to remove the "cgx =" I need to return this output as a string and use RegSubs on it, so either way string manipulations are required (unless an easier way to remove the cg's is apparent which I have missed). I just wondered if there was a simpler way of doing this.

- Yeti

As a test of this locate where your Maple is installed (probably /Library/Frameworks/Maple.framework)

Take the file directory up to the version of Maple you want to run in the terminal and type the following into the terminal (here is an example of mine) this will launch maple, as you are now specifying exactly where it is

/Library/Frameworks/Maple.framework/Versions/18/bin/maple ${*} 2>&1 | grep --line-buffered -v

For Maple 2016, I assume it will be this:

/Library/Frameworks/Maple.framework/Versions/2016/bin/maple ${*} 2>&1 | grep --line-buffered -v

 

@tomasmedici 

This is telling you that it does not know what Maple is, hence it cannot run it. You will need to do what I mentioned in my post about appending the location of maple to your bashrc file in order to run maple outside of where it is actually located.

these threads may be useful to you as well if what I wrote is not clear. If you have anymore questions about the process then feel free to ask.

https://askubuntu.com/questions/379066/terminal-does-not-recogninze-an-installed-program

https://askubuntu.com/questions/500694/how-can-i-make-it-so-i-can-run-a-specific-program-just-by-typing-its-name-in-th

https://askubuntu.com/questions/60218/how-to-add-a-directory-to-the-path?noredirect=1&lq=1

https://askubuntu.com/questions/381958/add-program-to-path?noredirect=1&lq=1

 

@tomasmedici 

What happens when you just launch Maple from the terminal?

maple

Also don't include the > I just used that to show the start of the prompt, I will edit my post to remove it as could be confusing.

- Yeti

@acer 

In the actual script I used %s to begin with, but kept getting "error, recursive assignment" so used %a as I thought I was not understanding the call to %s correctly. In the minimal working example above, %s does work; so there is something in the main script causing a confliction. Thank you for the catch.

- Yeti

Could you post the Maple script with the code in? This can be done by using the big green up arrow in the post editor.

-Yeti

@Carl Love 

Wow, this is some impressive Mapling. I did not realise Maple had a curry expression built in, and I will be using this in the future. Thank you.

- Yeti

@Joe Riel 

Apologies, yes a string output to a file with that format is needed.

-Yeti

@Joe Riel 

Thank you both for these very useful and clever insights. I did a speed comparison on a larger algebraic matrix using my old procedures and the methods both of you provided and there was a substantial increase in speed.

I used a 84 x 84 matrix with every element containing a lot of algebraic terms and my old procedures took 507.217 seconds to sort through the matrix, whereas both of your methods averaged much faster at < 200 milliseconds. I will be able to do more comparison when I go to much larger matrices, but they are clearly a better way of solving the problem.

Something I am having an issue with is getting the correct output format. At the moment it does the following:
 

table( [( 86528633/24603750 ) = [9, 9], ( -2953137353/1574640000 ) = [3, 8], [8, 3], ( -5869558139/3149280000 ) = [4, 9], [9, 4], ( 5389973/16402500 ) = [6, 10], [10, 6], ( -97875121/524880000 ) = [2, 10], [10, 2], ( -1286271073/2099520000 ) = [3, 6], [6, 3], ( 300654821/314928000 ) = [6, 8], [8, 6],

Whereas I would like it to be reordered in the following format:
 

|[1,1], insert matrix element here|[1,2]=[2,1], insert matrix element here|[1,3]=[3,1], insert matrix element here|

With matrix elements in order and | as separators. I am having trouble extracting out the information from the table in order to achieve this format. I am more used to using awk with Bash to change formatting, but is there a way Maple can do this? When I have tried it either hangs, or I lose kernel connection.

Once again, thank you for your help. It is greatly appreciated.

-Yeti

 

@Joe Riel 

Thank you for the reply, that is a very nice idea.

- Yeti

@ZWang 

I can load the script but my Maple can barely keep the script open due to (I assume) the point plot diagram making the file 25MB, so I cannot modify it at the moment. This post offers a nice working example of a bifurcation diagram which you might find useful:

http://www.mapleprimes.com/posts/128749-Logistic-Map-Example

-Yeti

Did you mean to attach a Maple script?

-Yeti

1 2 3 4 5 Page 2 of 5