nm

11353 Reputation

20 Badges

13 years, 11 days

MaplePrimes Activity


These are questions asked by nm

One can do igcd(12,8), and igcd(16,3), etc...

But how to define a list/set/array/vector/matrix, etc... that contains these pair of numbers, and then call/map igcd on this list?

I tried putting the pair of values in a list and set and even a matrix, calling calling map(igcd, lst) but not getting it right.

The confusing part for me with Maple is to know which data structure to use for each function, since there are more than one. Here are my silly attempts:

lst:={{12,8},{16,3}};
map(igcd,lst);

lst:=<<12|8>,<16|3>>;
map(igcd,lst);

lst:=[{12,8},{16,3}];
map(igcd,lst);

I was looking for something like in Mathematica:

lst = {{12, 8}, {16, 3}};
GCD @@ lst

    {4, 1}

I am sure it is possible to do this in Maple (i.e. map igcd to list of pair of numbers), I just can't get the syntax right. I did look at few examples somewhat related, but did not understand what they are doing. They said I need to pass an extra argument for map in this case?

thank you

Sorry for a basic question, but I am not able to find a setting for this, and I am stil newbie in using Maple UI.

A simple problem. When I copy some Maple code from the net, such as a proc() posted here or else where, then paste the code right into my open worksheet, then each line will show up with ">" at the left.

Is there a way to remove these ">" other than the way I do it now, which is manual process.

Having a ">" at start of each line does not seem to affect anything. The proc() gets defined fine, and I can call it. But normally when I write a proc(), there is no ">" to the left of each line, since those come only when hitting a RETURN. And that is what confuses me.

But what I am looking for, is a way to select some lines, and tell Maple to remove all the ">". Here is a screen shot of some code I just pasted to the worksheet:

 

 

I am on windows 7, 64 bit, using Maple 17.02. When opening the command line Maple, and typing:

But on the GUI, it works:

?index,packages;

and I get a new window open with the list of package.
In the command line, it works if I use ?index,package;  i.e. without the extra `s` at the end.

On a side question, I was looking at a Maple book, where it said to use ?index[packages];  but this no longer works, even in the GUI, and had to use ?index,packages;  syntax. I wonder when this change happens. The book is old, using Maple 7.

I started to notice that Maplesoft web site is not in English any more. This makes it hard to read for me. (it seems to be in French?)  I was wondering why this change?

I think it is best to keep it in the English language, since English is the most common language. I visit the site from the US where I live, and I use the same browser, firefox, same OS, windows 7, and I have changed nothing on my end. Here is a screen shot:

 

Warning: I am newbie in Maplem so if I am missing something obvious, please do not scream at me.

I noticed something strange here. I was trying to simplify this expression to sinh(x). The first step is to convert it to exp() form. Then the next step should have been just another convert to sinh since the resulting exp() expression from the first step was clearly a sinh(). Yet, I find that expand() and also simplify() in order for Maple to see this.

So my question is, what are the rules of the game here? Does one really have to baby step the simplification process like this to the extent of telling Maple that

is the same as

by using simplify(), before getting the result needed?

Here is the code: (the goal again is to obtain sinh(x) as final simplification)

%------ this works --------------
s:=(1/2)*exp((1/2)*x)*(cosh((1/2)*x)-cosh((3/2)*x)+sinh((1/2)*x)+sinh((3/2)*x));
convert(s,exp);
expand(%);
simplify(%);   %-----> without this, will not work
convert(%,sinh);
%--------------------------

but

%---- this does not ----------------
s:=(1/2)*exp((1/2)*x)*(cosh((1/2)*x)-cosh((3/2)*x)+sinh((1/2)*x)+sinh((3/2)*x));
convert(s,exp);
expand(%); 
convert(%,sinh);  % is simplify really needed BEFORE this step?
simplify(%);  % 
----------------------------

Fyi, in Mathematica, I only needed to convert to exp() and back again to Trig to get the answer:

Or using Simplify

First 194 195 196 197 198 199 Page 196 of 199