Items tagged with map map Tagged Items Feed

Hi All,

I have a stupid question.

I wanted to distinguish the fuction of map and Map and tried some test.

Sometimes, the Map is identical to the map:

But sometimes not:

 


Maple Help seems not to explain the difference very clearly.

map_and_Map.mw

I'd appreciate any help on this topic. Thank a lot.

Hi All,

I used the command map to apply a procedure to elements of a array like this:

 

Why did I get the null array "[]"?

A vector was also used and got the similar result: 

 

I'd appreciate any help on this topic. Thank a lot.

Say I have this list,

tmp:=[[0, 1, 2], [1, 0, 2], [1, 1, 2], [1, 2, 0]];

and the sums of each element (list),

map(x->convert(x,`+`),tmp);

 

How do I quickly pickup the elements, where they sum to 3? Like this:

wanttohave:=[[0, 1, 2], [1, 0, 2],  [1, 2, 0]];

Thanks,

In Maple 18, the Database package has been updated to include support for SQlite databases as well as a new option for plots to change the background images on plots.  To showcase both of these features, our engineering team put together an example that optimizes the flight path of a pan-US delivery drone.

This application extracts the latitude and longitude of those zip codes from an SQLlite database (the application includes the database, which cross-references US zip codes against their latitude, longitude, city and state). The application then performs a traveling salesman optimization and plots the shortest path on a map of the US.

To download the application click here: PanUSDeliveryDro.zip

hi all.
i have a system of ODE's including 9 set of coupled OED's . 

i have  converted second deravaties to dd2 , in other words : diff(a[i](t),t,t)=dd2[i](t) . i =1..9 :

and i have set these 9 equations in form of vibrational equations such :  (M.V22)[i]+(K(t).V(t))[i]+P(t)[i] = eq[i] , where M is coefficient Matrix of second  derivatives , V22 is Vector of second derivaties , for example V22[1] = diff(a[1](t),t,t) , and  P(t) is the numeric part of equations ( they are pure number and do not contain any symbolic function ) and K(t).V(t) is the remaining part of equations such that : (K(t).V(t))[i] = eq[i] - (M.V22)[i] - P(t)[i]  , and V(t) are vector of a[i](t)'s which V(t)[1] = a[1](t) ,

i have used step by step time integration method (of an ebook which i have attachted that part of ebook here), when i set time step of solving process to h=0.01 , i can solve this system up to time one second or more, but when i choose h=0.001 or smaller, the answer diverges after 350 steps . i do not know whether the problem is in my ODS system, or maple can not handle this ?the answer about the time t=0.3 are the same in both steps, but after that, the one with stpe time h=0.001 diverges. my friend has solved this in mathematica without any problem, could any body help me ?! it is urgent for me to solve this problem,thnx everybody.


ebook.pdf  step_=_0.001.mw  step_=_0.01.mw 

Let me first explain what I mean by 'color mapped scatter plot'.

Suppose we have a three dimensional coloum data like

[[1, 1, 0],[1, 2, 2],[1, 3, 3],[2, 1, 1],[2, 2, 4],[2, 3, 5],[3, 1, 2],[3, 2, 1],[3, 3, 3]]

The first two numbers are independendant variables, and the 3rd ones indicate 'values' at the given two independent variables.

Then, for example, if I use Origin 8.5, I can make a so called color mapped scatter plot which gives me a plot like usual two dimensional scatter plot but the color of the symbols are determined by the values in the third column.

I show an example from the Originlab, http://www.originlab.com/www/helponline/origin/en/UserGuide/Color_Mapped_Graph.html,

An example of the color mapped scatter plot made with Origin

 

I looked into the manual, etc. but I could not find a way. Because data are not evenly and homogeneously spread over x-y plane, and not dense, typical contour plot cannot be used.

 

Does anyone have a quick idea?

 

 

 

 

 

 

 

 

so we have to Write a maple function with -> that takes an integer N and a boolean function

F: {(i,j) l 0<= i,j<= N} -> {true,false} 


and returns a list containing all [i,j] such that F(i,j). A procedure that does this
would be


proc(N,F) local i, j, RV;
RV:=NULL;
for i from 1 to N do for j from 1 to N do
if F(i,j) then RV:=RV,[i,j] ; end if ;
end do ; end do ;
return RV ;
end proc ;


The problem is to do this inline, i.e. you have to write
(i,j)-> ...

 

please help...

How to open batch maple output as mws in Maple Player?  I was used to doing this daily at work before retirement in my university office on a campus computer.  There was an "open" command in a file menu of some sort that I could click on, I seem to remember.   Am just fresh afte downloading Maple Player on my iMac and have it installed.  The file from my batch Maple output is form a run of batch Maple on the office machine that I can logon to remotely from home, as I did in this case.  I get rough looking graphic output (using the alphabet style graphics methods).  It would be good to have a more detailed and fine grained graphics to answer some basic questions that I am analyzing.  Thanks . . !!

Sort alpha list...

January 17 2014 brian bovril 389

Gentlemen

I know the following:{A>E,F>Z,F<P,Z>E,P<A} , all real Numbers

can I get maple to sort these in order largest to smallest.

[in this case:  A>P>F>Z>E ]

I need to create a function from one list to another, but I don't want to define an operation.  I only want to assign a 1-1 mapping from a list of 64 elements to another list of 64 elements, i.e. the 1st element in list a is assigned to the 1st element in list b, etc.  I see plenty of examples of how to do this with an operation, but I don't want the mapping to perform any operation, just the mapping.  How is this done?

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

i confused for finding a very special command that can join a "set of values" to a "set of indices " ?

also i can't use the map command for this ( guide ? )

like this :

{(1,1),(1,2),(2,1),(2,2)}

{1,2,3,4}

i want to join the two sets to form a complet set of equations index :

{(1,1)=1,(1,2)=2,(2,1)=3,(2,2)=4}

since this is just a simple example , but i need an efficent way for doing it in large size data (image processing)

appreciate for answering !

 

I have a two-variable matrixfunction A(x,y) with entries Ai,j(x,y).
I want to use mtaylor for each entries and the result to store in a matrix B.
Is it possible to do using the map command?
If not, what methods do exist?
(Instead of typing mtaylor for each entires.)

Sandor

Hi all,

I have been trying to improve my code to speed up a bit.

Here is the toy example:

######################

restart:

myfunc:=proc(phi,p,CH)
 # dummy code
 # dummy code
 # dummy code
 # dummy code
end proc;

a:=myfunc(phi,p1,CH1)
b:=myfunc(phi,p2,CH1)
c:=myfunc(phi,p3,CH1)

ANS1:=w1*a+w2*b+(1-w1-w2)*b

a:=myfunc(phi,p1,CH2)
b:=myfunc(phi,p2,CH2)
c:=myfunc(phi,p3,CH2)

Hi all,

#####################################
myp:=proc(a,b,c)

local ans;

ans:=zip(`+`,a,b);

ans:=ans*c;

return ans;

end proc;
myp([$1..4],[x,y,z,w],2);
map2(myp,[$1..4],{[x,y,z,w],[x2,y2,z2,w2],[x3,y3,z3,w3]},4);

map2(myp,[$1..4],{[x,y,z,w],[x2,y2,z2,w2],[x3,y3,z3,w3]},10);
map2(myp,[$1..4],{[x,y,z,w],[x2,y2,z2,w2],[x3,y3,z3,w3]},0.5);

#####################################

Is it possible to use something like

1 2 3 4 Page 1 of 4