MaplePrimes Questions

How to generate a random normal distribution of points around the point [3,15] for example?

Hello everyone

I have a problem with the code below in maple:

> restart;
> f := signum(a*cos(t+b)+sin(t+c));
> res := int(f, t = 0 .. 2*Pi);
                       2 Pi signum(a cos(b) + sin(c))
> a := 0.01; b := 0; c := 0;
> res; int(f, t = 0 .. 2*Pi);
                                    2 Pi
                                     0.

As you can see, results are not consistent with one another...

If I set a := 0.01; b := 1.35; c := 4.4; It is even worse, the computation of int(f, t = 0 .. 2*Pi) lasts more than 10 minutes (when I interrupt computation)

I tested it in Maple 12 and Maple 2015 and I get exactly the same results. I also replaced signum with csgn and I get the same problem.

I really need your help!!

Dear All

I intend to convert Lie algebra into abstract Lie algebra with the aid of Maple packages DifferentialGeometry and Lie algebras. I want to do this for classification of Lie algebra for group inavriant solution, can anybody help me out.....?

Regards

woud like to find H(x)

just for one of definition H(x) + H(y) = H(x+y), but it seems require to duplicate one more set of differential system

Error, (in dsolve) found differentiated functions with same name but depending on different arguments in the given DE system: [{a(x), a(y)}, {b(x), b(y)}]

eq2a := a(x)*(diff(c(x), x))+b(x);
eq3a := a(x)*(diff(b(x), x))+c(x)*(diff(b(x), x));
eq4a := a(x)*(diff(c(x), x))+a(x)*(diff(b(x), x))+b(x);
eq2b := a(y)*(diff(c(y), y))+b(y);
eq3b := a(y)*(diff(b(y), y))+c(y)*(diff(b(y), y));
eq4b := a(y)*(diff(c(y), y))+a(y)*(diff(b(y), y))+b(y);
inis := diff(a(x),x)=H(a(x)), diff(b(x),x)=H(b(x)), diff(c(x),x)=H(c(x)), a(1) = b(1), b(1) = c(1), a(0) = b(0), b(0) = c(0);
inis := diff(a(x),x)=H(a(x)), diff(b(x),x)=H(b(x)), diff(c(x),x)=H(c(x));
inio := diff(a(y),y)=H(a(y)), diff(b(y),y)=H(b(y)), diff(c(y),y)=H(c(y)),H(a(x)) + H(b(x)) = H(a(x)+b(x));
sol := dsolve([eq2a=1, eq3a=exp(a), eq4a=0, eq2b=1, eq3b=exp(b), eq4b=0, inis, inio], [a(x), b(x), c(x), a(y), b(y), c(y), H(a(x)), H(b(x)), H(a(y)), H(b(y))]);

I have a function c(k), I want to graph it where the x-axis has the units k/K (where K is a constant, about 0.0027). I was wondering how that is possible to do because for the life of me I can't figure out how to get maple to allow for relative units like that. Here's my code:

 

K:=0.0027

c := sqrt(9.8*K/k+0.7197e-1*k/K*(1/1000))

cmin:=(0.7197e-1*(4*9.8)*(1/1000))^(1/4);

C:=c/cmin

plot(C, k = 0 .. 4, 0 .. 4)

 

 

Hello all,

here the programme I think there are some mistakes couldnot know where please any comment will be helpful:

# Firstly, set the size limit for the grid, which shall define how many
# points there are in both the vertical and horizontal direction
size=40;
# limit is a variable used to set an unobtainable upper bound
limit=size+1;
# x defined, starting at 1, and two other variables ud (upper diagonal) and
# dd (downward diagonal) begin at 0. All three are used to iterate through
# line creation

x=1;
ud=0;
dd=0;
# Iteration through x, using the line function to create a number of
# horizontal lines up to the limit point

while(x<(limit))
line([0, size], [x, x]);
x=x+1;
end

# Now iterating through the diagonals pointing upwards, using two sets of
# lines, both starting from the line going through the origin. The first
# iterates through the lines that pass through positive x values at y=0,
# the second iterates through the lines passing through negative x values
# at y=0
# ud must be increased by 2 each time to ensure that equilateral triangles
# are formed.

while(ud<(limit))
line([(ud), (size)], [0, (size-ud)]);
line([0, (size-ud)], [(ud), (size)]);
ud=ud+2;
end

# Similar to before, except this time iterating through downward pointing
# diagonals.

while(dd<(limit))
line([(dd), 0], [0, (dd)]);
line([(size), (dd)], [(dd), (size)]);
dd=dd+2;
end

# xvector and yvector set up as two vectors holding x and y co-ordinates of
# points respectively.

xvector = zeros(1, limit);
yvector = zeros(1, limit);

# Reinitiallising x and y values for iterative purposes.

x=0;
y=0.5;
n=1;

# The program now iterates through potential y values for the potential
# points. Then it tests the value of y to see what orientation the lattice
# is at that point, then randomly selects x values to enter, iterating
# between all the possible x values in the orientation before moving on to
# the next y value.

while(y<size)
if(mod(y,1)==0.5)
x=0.5;
while(x<size)
z=rand;
if(z>0.5)
xvector(n) =x;
yvector(n) =y;
n=n+1;
end
x=x+1;
end
elseif(mod(y,2)==1)
x=0;
while(x<size)
z=rand;
if(z>0.5)
xvector(n) =x;
yvector(n) =y;
n=n+1;
end
x=x+2;
end
else
x=1;
while(x<size)
z=rand;
if(z>0.5)
xvector(n) =x;
yvector(n) =y;
n=n+1;
end
x=x+2;
end
end
y=y+0.5;

end

# The program then enters the two co-ordinate vectors saved previously into
# the scatter function.

hold;
scatter(xvector, yvector);

Hello everyone, Im now doing my fyp project in cryptography. I need to encrypt a message by using genetic operator, mutation and crossover and decrypt it after that.

For example:

message:=elgamal;

m:=convert(message,bytes);

with(Bits):

for i from 1 to l do
bit[i]:=Split(M[i]);

end do;

After that I will use genetic operator to change some bit for each character.

The output I might get will be something like this [1,1,1,1,1,1,1] , after that I need to convert it back to Ascii key value by join function, but sometime it might exceed 127 which out of the range of Ascii key value. Any command can solve this problem or any method can be used which will not affect the original message? Thank you.

Hello, anyone know how to convert a word to 8 bits binary number ?

For example:

Here is my code:

message:=Hello
m:=convert(message,bytes);

>m:=[104,101,108,108,111]

with(Bits):

for i from 1 to 5 do:
mb[i]:=Split(m[i]);

end do;

>mb[1]:=[0,0,0,1,0,1,1] mb[2]:=[1,0,1,0,0,1,1] mb[3]:=[0,0,1,1,0,1,1] mb[4]:=[0,0,1,1,0,1,1]

  mb[5]:=[1,1,1,1,0,1,1]

 

Anycommand can add additional one column when split the words into binary to form 8 bit in each row? Any help will be highly appreciated. Thank you.

 

 

 How get another solutions ? f:=exp(x2*(a-x))

Hi,

 

I would like to start using maple workbook to manage my projects but i can't figure out the paths. suppose i have a workbook named: WorkBookTest.maple

and inside this i have a folder containing Data in which i have an excel workbook DataTest.xlsx

and also i have a folder containing Documents in which i have a maple worksheet Document.mw

and also i have a folder containing Code in which i have a mathematica notebook Code.nb

 

Now inside the maple worksheet, to import the excel data i use the command: Import("this:///Data/DataTest.xlsx")

and it works

Now inside the mathematica workbook, to import the excel data i use the command: Import["this:///Data//DataTest.xlsx"]

and it fails

 

so if i have other program like mathematica notebook inside maple workbook that wants to call a file with data, how should i define the path?

Does Maple have something similar to c-means clusteirng in Matlab?

http://www.mathworks.com/help/fuzzy/fcm.html

 How would I go about doing something like this in Maple?

The docs for the package geometry say:

 

The command with(geometry,distance) allows the use of the abbreviated form of this command.

I am new to Maple. What is the abbreviated form of the distance command?

aa3 := Normalize(<<aa2[1,1],aa2[2,1],aa2[3,1]>,<aa2[1,2],aa2[2,2],aa2[3,2]>,<aa2[1,3],aa2[2,3],aa2[3,3]>>, Euclidean);

the result is one column

how to normalize to a matrix form?

I have a problem with finding a interval where parametr "a" is changing.
My funcion:

                 exp(x2(a-x)) for xcR.
I did this, and I don't know what's next.

g:=x->exp(x2(a-x));
dg:=diff(g(x),x);
solve(dg=0,x);
                      0,2/3a
g(0);
g(2/3a);

Hi, all. I need to built a user interface for my program. First, I create two label and two text area for both the value of x and y. After that I assign a button to random generate the value for x and y within the range with x <y. I write the code below into click action of the button.

use DocumentTools in

Do(%x=RandomTools[Generate](integer(range=1..7);

Do(%y=RandomTools[Generate](integer(range=1..7);

while %x>= %y do

Do(%x=RandomTools[Generate](integer(range=1..7);

Do(%y=RandomTools[Generate](integer(range=1..7);

end do;

end use;

This code can generate two random number and insert inside the boxes created. When the button is clicked, two random number generated but the error dialog box shown on the screen with message : Error in component button with caption "generate" cannot determine if this expression is true or false: %y=%x. What I want is only the true value of x<y will be inserted to the text boxes. 

Any suggestion? Any help will be highly appreciated. Thank you.

 

First 1136 1137 1138 1139 1140 1141 1142 Last Page 1138 of 2428