MaplePrimes Questions

Good Evening Everybody,

Would anybody show me how to subtract a scalar from each value in a list and output the results as list. Below is the problem am trying to solve, transforming the coordinate of the list to the origin (C.G). My goal is to output w =[ .....] and z = [.....]

 #msub(mi("x"),mi("coord")) := [0., 2., 8., 10., 5., 5., 7.5, 7.5, 2.5, 2.5, 

5.0, 5.0, 0]
#msub(mi("y"),mi("coord")) := [0., 10.0, 10.0, 0., 0., 2.0, 2.0, 3.0, 3.0,

Hi,

I am trying to save batch of data into different of files.

for i to nops(a) do
save a[i], "key_[i].m"
od;

Error, save can only save names

 

i.e. save each element in "a" to the file named "key_i" (key_1,key_2,key_3,ect)

how should I write the code?

Thanks.

casper

Hi,

I remember using 'global' in the procedure as a global parameter,

however, it's not working...

 

In the Belgium lottery they pick 6 numbers out of 42   (  there can't be 2 equals numbers being picked out )
Now for my maple homework , i must do some exercices in maple

1 ) Simulate the lottery
2 ) If you partici

This is a continuation of the new thread that was started with this post.

Code to create a maplet that generates unique random numbers from a sample space could look like:

Hi,

I got something like:

t:=NULL:

for i to nops(S) do

...

...

temp2:=(temp)^(-1) mod t[i]:

...

...


od:

 

the problem is that since I have assigned t:=NULL

for i=1

there is a problem to run

temp2:=(temp)^(-1) mod t[i]:
 

it becomes

temp2:=(temp)^(-1) mod t[1]:

at that time 't' is actually a number , just a single value, so it cant have subscript.

 

how do I solve that problem?

 

Hi,

I am writing an procedure in which has the following:

print( array(  [['p', 'q' , 'e', 'd'],
          seq([p[k],q[k],e[k],d[k]],k=1..nops(M1) )       ]));

that 'p','q','e' and 'd' all have been used within the procedure.

The "print", in the first line     "['p', 'q' , 'e', 'd']" , I would like them to display as texts, how should do that?

Thanks.

casper

 

Hi,

I can generate 1 random number  by

rand(10^20)():

how can i get, say 6 distinct random numbers in the scacle of 10^20 as well?

Thanks.

casper

How do i print numbers upto 100 that are not multiples of x,y,z?
 

I would be very gratefull for any help
 

Thanks

Hi All,

I searched the forum and found labelledcontourplot that would give the values/label on the contour plot.  However, when searching the Maple 13 Help for "labbelledcontourplot", the search does not return any result.

 

Thanks fo ryour help.

 

How do I plot f(x,y) = x^3*y, constrained to x^2 + 2*y^2 = 8? 

Thank you for your help.

You can easily (or at least comparatively easy) create Maplets in Maple but you can not (as far as I know)

create shortcuts to such Maplets in the main menu. I must say I find this very strange.

It is like having the tools and resources to build a boat but you don't have access to water.

I don't want to create a Maplet and having to open a worksheets each time I want to load the Maplet.

It just destroys the whole experience. Again I find this very strange :-)

 

Let we have a function, f(x), and want to approximate its integral from x = a til x = b.

Divide the interval [a,b] into n equal (not necessary equal) parts.

Let one of the part, i,  is from x(i) til x(i+1).

Let us draw a tangent to the curve in this part, i, by the command:

Tangent(f(x), x=(x(i)+x(i+1))/2)

we may find the area under this tangent and in this interval through the command:

int(%,x=x(i)..x(i+1))

Thus in ths limit:

the original area is equal to the sum of these areas.

Hi,

I would like to work in modula 26 for the whole workshee.

 

What's the command for that?

 

Thanks.

 

Casper

How to find a pattern in:

 

1, 3, 240, 840, 80640, 887040,...

First 2088 2089 2090 2091 2092 2093 2094 Last Page 2090 of 2434