Maple 2015 Questions and Posts

These are Posts and Questions associated with the product, Maple 2015

When a list is so big, full combination can not be calculated in limited time

is there any skill to split into small combinations when use with combination packages?

originally I can use for loop to do this 

but it need to refactor code in order to write well in generic style. 

Is there another skill to use combination package instead of for loop

#my testing for wildcard to one
#after testing, it loop a very long time and not stop
ppp := [[0,0,0,x],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
check1 := [seq(0,ii=1..nops(ppp))];
ttt1 := [[0,0,0,1],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
mmmeaght1 := [seq(0,ii=1..nops(ppp[1]))]:
bbb1 := [seq(0,ii=1..nops(ppp[1]))]:
emap := [(xx) -> if [xx < 0 assuming x > 0] then 0 else 1 end if, (xx) -> evalf(1/(1+exp(xx)))]:
#trace(perceptronrule1);
MM(ppp, ttt1, mmmeaght1, bbb1, check1, emap);
 

when test wildcard variable for input, would like to assume x > 0 then

i try assuming x > 0 , got error

 

I want to calculate the intersection between three circles.
I know that in this case i can calculate intersection of only the first and second equation, but I need this for a interactive component.

The command "intersection"[GEOMETRY] work only with 2 circles.

I did this but it doesn't work.

It doesn't give me an error,but  nothing happens.

eq1: x^2+y^2-6600*x-4400*y+15717900 = 0
eq2: x^2+y^2-6820*x-4180*y+15989800 = 0
eq3: 1.966975428*10^7+x^2+y^2-7480*x-4840*y = 0

Thanks, Enrico

I used the command line betwen two poin, and i saw the graphic.

The line passes for my two point, but i I would like it started in the first point and finished in the second.

So unlike this:

Thanks, Enrico

when test most simple case one to one, and many to one these two reasonable cases, it run a very long time without exit the program.

when i test with the example in book Neural Network Design, it can output correctly but only for book example.

restart:
with(ExcelTools):
with(ListTools):
with(plots):
with(LinearAlgebra):
zipplus := proc(mm, pp)
return zip((x,y) -> x+y, mm, pp)
end proc:
zipminus := proc(mm, pp)
return zip((x,y) -> x-y, mm, pp)
end proc:
zipstar := proc(mm, pp)
return zip((x,y) -> x*y, mm, pp)
end proc:

metara := proc(pp,meaght,bb,mapp,deep)
if deep > 0 then
 pp2 := metara([seq(pp[i], i = 1 .. nops(pp))],meaght,bb,mapp,deep-1):
 mp := zip((x,y) -> x*y,pp2,meaght):
 mpsam := sum(mp[m],m=1..nops(pp2)):
 mpb := [seq(0, i = 1 .. nops(pp2))]:
 for ii from 1 to nops(bb) do
  mpb[ii] := evalf(mpsam + bb[ii]);
 od:
 pa := [seq(0, i = 1 .. nops(pp2))]:
 for ii from 1 to nops(bb) do
  pa[ii] := evalf(mapp[deep](mpb[ii])):
 od:
 return pa:
else
 return pp:
end if:
end proc:

perceptronrule1 := proc(p, t1, meaght1, b1, checksum, mapp)
 meaght3 := meaght1:
 b3 := b1:
 checksum2 := checksum;
 print(p[1]):
 while sum(checksum2[jj], jj=1..nops(p)) <> nops(p) do
  #print("sum(checksum2[jj], jj=1..nops(p))");
  #print(sum(checksum2[jj], jj=1..nops(p)));
  for ii from 1 to nops(p) do
   #print("metara(p[ii],meaght3,b3,mapp,1)");
   #print("p[ii]");
   #print(p[ii]);
   #print("b3");
   #print(b3);
   #print("meaght3");
   #print(meaght3);
   #print(metara(p[ii],meaght3,b3,mapp,1));
   #print("t1[ii]");
   #print(t1[ii]);
   e := zipminus(t1[ii], metara(p[ii],meaght3,b3,mapp,1));
   #print("e");
   #print(e);
   meaght2 := meaght3 + zipstar(e,p[ii]);
   #print("meaght2");
   #print(meaght2);
   #print("meaght3");
   #print(meaght3);
   #print("b3");
   #print(b3);
   b2 := b3 + e;
   #print("b2");
   #print(b2);
   #print("b3");
   #print(b3);
   #print("checksum2");
   #print(checksum2);
   diff1 := zipminus(meaght2, meaght3):
   diff2 := zipminus(b2, b3):
   if sum(diff1[m],m=1..nops(diff1)) = 0 and sum(diff2[m],m=1..nops(diff2)) = 0 then
    checksum2[ii] := 1:
   else
    checksum2[ii] := 0:
    b3 := b2:
    meaght3 := meaght2:
   end if:
  od:
 od:
 return [meaght3, b3, checksum];
end proc:

#Example from book
ppp := [[2,2],[1,-2],[-2,2],[-1,1]]:
check1 := [seq(0,ii=1..nops(ppp))];
ttt1 := [[0,0],[1,1],[0,0],[1,1]]:
mmmeaght1 := [seq(0,ii=1..nops(ppp[1]))]:
bbb1 := [seq(0,ii=1..nops(ppp[1]))]:
emap := [(x) -> if x < 0 then 0 else 1 end if, (x) -> evalf(1/(1+exp(x)))]:
#trace(perceptronrule1);
perceptronrule1(ppp,ttt1,mmmeaght1,bbb1,check1,emap);

#my testing for one to one
#after testing, it loop a very long time and not stop
ppp := [[0,0,0,1],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
check1 := [seq(0,ii=1..nops(ppp))];
ttt1 := [[0,0,0,1],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
mmmeaght1 := [0,0,0,0]:
bbb1 := [0,0,0,0]:
emap := [(x) -> if x < 0 then 0 else 1 end if, (x) -> evalf(1/(1+exp(x)))]:
#trace(perceptronrule1);
perceptronrule1(ppp,ttt1,mmmeaght1,bbb1,check1,emap);

#my testing for many to one
#after testing, it loop a very long time and not stop
ppp := [[1,1,0,0],[0,1,1,0],[0,1,0,1]]:
check1 := [seq(0,ii=1..nops(ppp))];
ttt1 := [[1,0,0,0],[0,1,0,0],[0,0,0,1]]:
mmmeaght1 := [0,0,0,0]:
bbb1 := [0,0,0,0]:
emap := [(x) -> if x < 0 then 0 else 1 end if, (x) -> evalf(1/(1+exp(x)))]:
#trace(perceptronrule1);
perceptronrule1(ppp,ttt1,mmmeaght1,bbb1,check1,emap);

#my testing for one to many
#after testing, it loop a very long time and not stop
ppp := [[1,0,0,0],[0,1,0,0],[0,0,0,1]]:
check1 := [seq(0,ii=1..nops(ppp))];
ttt1 := [[1,1,0,0],[0,1,1,0],[0,1,0,1]]:
mmmeaght1 := [0,0,0,0]:
bbb1 := [0,0,0,0]:
emap := [(x) -> if x < 0 then 0 else 1 end if, (x) -> evalf(1/(1+exp(x)))]:
#trace(perceptronrule1);
perceptronrule1(ppp,ttt1,mmmeaght1,bbb1,check1,emap);

Hello,

i need to represent a circle using the command [geometry] circle because i have a problem and i have to calculate an 

intersection between two circles whit command intersection() which is ruled by Package geometry.

 

The equations of the two circles are:

eq1: x^2+y^2-6600*x-4400*y+15730000 = 12100

eq2: x^2+y^2-6820*x-4840*y+17484500 = 6400

For example, with the first circle  i did like the help page says


 But it's Error:

centre of circle(3300;2200)

radius=110


I don't understand the eror. Can you help me?
Thanks in advance, Enrico.

Hello.

I've just installed Maple 2015 and when I started it, this happened

It seemed that something was wrong with the graphics or java. But I really don't know what to do next.

Please help me, thank you.

Say I define the following variables.

These are all nineth roots of unity. An equivalent definition would be:

 

In fact, the following code shows that aa[i] /a[i] =1 for all i, so one would concluse aa[i]=a[i]:

for i to 9 do 
simplify(a[i]/aa[i])
end do

But when I try to check via "Equal":

I get as output

                              true
                             false
                             false
                             false
                             false
                             false
                              true
                             false
                             false
The problem goes even further since one representation is accepted as a solution of a linear equation system while the other is not.

 

Another curiosity:

gives just the same expression, whereas simplifying the same expression to the third power gives 0.

I am writting a program that needs to rename variables by increasing the second index of a variable, all the variables will be named y[something,number].

e.g.

y[a,2]->y[a,3]

If I was doing this outside maple I can see how I could use regular expressions, but I can't see how to do it in maple

http://www.maplesoft.com/applications/view.aspx?SID=4229

from book example, it seems assumed that input size of data such as list size or matrix size is the same as

trained data set size, but this need to hard code infinite number of types of size

What is the method to programming neural network when input size is smaller or changing and not equal to size of trained data set?

Hello! Hope everyone would be fine. I want to solve the following system of ODEs please help to find the numerical solution

N := .6; alpha := .4; beta := .1; Nt := .2; Pr := .5; Nb := .1; s := .2; lambda[1] := 1; delta := .5; gm := 1; Sc := 1:L:=1:

Eq1 := (alpha*s+1)*(diff(F(eta), eta, eta, eta))-(F(eta)+(1/2)*s*eta)*(diff(F(eta), eta, eta))+((1/2)*(diff(F(eta), eta))-s)*(diff(F(eta), eta))-2*(G(eta)^2-(1-gm)^2)-2*lambda[1]*(H(eta)+N*Y(eta))-(alpha+beta-(1/4)*delta*(diff(F(eta), eta, eta, eta)))*(diff(F(eta), eta, eta))^2-(alpha-2*beta)*(diff(F(eta), eta))*(diff(F(eta), eta, eta, eta))-(2*(alpha-beta-(1/4)*delta*(diff(F(eta), eta, eta, eta))))*(diff(G(eta), eta))^2-(2*(alpha-(1/4)*delta*(diff(F(eta), eta, eta))))*G(eta)*(diff(G(eta), eta, eta)) = 0; Eq2 := (alpha*s+1)*(diff(G(eta), eta, eta))-F(eta)*(diff(G(eta), eta))+G(eta)*(diff(F(eta), eta))+s*(1-gm-G(eta)-(1/2)*eta*(diff(G(eta), eta)))-(1/2)*alpha*s*eta*(diff(G(eta), eta, eta, eta))+((3/2)*alpha+beta)*G(eta)*(diff(F(eta), eta, eta, eta))-((1/2)*alpha+beta)*(diff(F(eta), eta))*(diff(G(eta), eta, eta))-delta*((diff(F(eta), eta, eta))^2+6*(diff(G(eta), eta))^2)*(diff(G(eta), eta, eta)) = 0; Eq3 := (diff(H(eta), eta, eta))/Pr-F(eta)*(diff(H(eta), eta))+(1/2)*H(eta)*(diff(F(eta), eta))-s*(2*H(eta)+(1/2)*eta*(diff(H(eta), eta)))+Nb*(diff(H(eta), eta))*(diff(Y(eta), eta))+Nt*(diff(H(eta), eta))^2 = 0; Eq4 := (diff(Y(eta), eta, eta))/Sc-F(eta)*(diff(Y(eta), eta))+(1/2)*Y(eta)*(diff(F(eta), eta))-s*(2*Y(eta)+(1/2)*eta*(diff(Y(eta), eta)))+Nt*(diff(H(eta), eta, eta))/Nb = 0;

IC1 := F(0) = 0, (D(F))(0) = 0, G(0) = gm, H(0) = 1, Y(0) = 1; IC2 := (D(F))(L) = 0, G(L) = 1-gm, (D(G))(L) = 0, H(L) = 0, Y(L) = 0; dsys1 := {Eq1, Eq2, Eq3, Eq4, IC1, IC2}; dsol1 := dsolve(dsys1, numeric, output = listprocedure, range = 0 .. L);

dsol1f := subs(dsol1, F(eta));

dsol1g := subs(dsol1, G(eta)); dsol1h := subs(dsol1, H(eta)); dsol1y := subs(dsol1, Y(eta));

With my best regards and sincerely.

Hi, there

How can I find the recurrence relation  for second derivative of sequence of functions  f-{n}(x)=\frac{(1-x^2)^n}{n!} in  maple 15?

please specify the commands.

we know the solution f"_{n}(x)=2(1-2n)f_{n-1}(x)+4f_{n-2}(x)

Regards

M.R. Yegan

Dear all

I have created a script code in maple. I also have contructed a power circuit in matlab simulink. How I use my code in matlab?

I use the example procedure when search. Clock in help 

but elapsed function can only run one time

because it return clock is not running

need to run clock start again and calculate from beginning again

how elapsed function can run more times

1 2 3 4 5 6 7 Last Page 1 of 39