Maple 2015 Questions and Posts

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

the program is not recognized kthe program is not recognized the k

I have a set of differential equations on 3 variables, B[1],B[2] and C. Its not physically meaningful for B[1]+B[2]>0.5 so i would ideally like to replace the cube that the solutions are displayed on (the axis take the limits B[1]=0...0.5,B[2]=0...0.5,C=0...100 ) with a triangular prism (the axis take the limits B[1]=0...0.5,B[2]=0...0.5,B[1]+B[2]<0.5,C=0...100 ).

Failing that i'd like the plot to display a plane showing where the meaningful values for the variables end.

here is the code I use to put the ODEplot together

Model := [diff(B[1](t), t) = k[a1]*C(t)*(R-B[1](t)-B[2](t))-k[d1]*B[1](t), diff(B[2](t), t) = k[a2]*C(t)*(R-B[1](t)-B[2](t))-k[d2]*B[2](t), diff(C(t), t) = (-(k[a1]+k[a2])*C(t)*(R-B[1](t)-B[2](t))+k[d1]*B[1](t)+k[d2]*B[2](t)+k[m]*((I)(t)-C(t)))/h];
DissMod := subs((I)(t) = 0, Model);
AssMod := subs((I)(t) = C[T], Model);

Pars1a := [k[a1] = 6*10^(-4), k[d1] = 7*10^(-3), k[a2] = 6*10^(-4), k[d2] = (7/5)*10^(-3), R = .5, k[m] = 10^(-4), C[T] = 100, h = 10^(-6)];

Pars := Pars1a; thing11 := subs(Pars, AssMod[1]), subs(Pars, AssMod[2]); thing12 := diff(C(t), t) = piecewise(t <= 100, subs(Pars, rhs(AssMod[3])), subs(Pars, rhs(DissMod[3]))); sol := dsolve({thing11, thing12, C(0) = 0, B[1](0) = 0, B[2](0) = 0}, {C(t), B[1](t), B[2](t)}, numeric, output = listprocedure, maxstep = 2, maxfun = 1000000); ParsPlot1a := odeplot(sol, [B[1](t), B[2](t), C(t)], t = 0 .. 700, color = blue, view = [0 .. .5, 0 .. .5, 0 .. 100], tickmarks = [[0 = 0, .5 = R], [0 = 0, .5 = R], [0 = 0, 25 = (1/4)*C[T], 50 = (1/2)*C[T], 100 = C[T]]]);


But I can't see a way of either making the plane or making the ODEplot axis into something other than a cube.

Hello

How can i get whether a radio box is checked or not through another button action window. I have attached a picture of my question. Could you please help me to solve it.

 Thank you

I have use a ''for cycle'' in order to get a series of points. I would like to save those points in a vector in order to use it for the ''PolynomialFit'' comand. The problem is that the points that I save are sort randomly. How can I take the value of the vector A in the right sequence? in the underline string you can plot the walue of A over t (which is not sorted). I can not use the sort command as I used for t even for A because the points are not increasing.

This is my code:

restart;

Atot := 0:

for ii from 0 by 0.01 to 2 do

PtotFkt := ii->  ii^2 :

Ptot := PtotFkt(ii):

Atot := Atot+0.01*Ptot:

A[ii] := Atot: #Save points in a Table

t[ii] := ii: #Save point in a table

end do;

AV := convert(A, list): #conversion from table to list
nops(AV);  #number of points

timme := convert(t, list): #conversion from table to list
nops(timme); #number of points

 

with(Statistics); #PolynomialFit

X := Vector(AV, datatype = float);

Y := Vector(sort(timme), datatype = float);

plot(Y, X, style = point, symbol = asterisk, color = blue);

regress := PolynomialFit(10, X, Y, time);

curve1 := plot(regress, time = 0 .. 2);

In Mathematica I've a function which allows me to send a mail. I use it when I run some long time computations and I want to get an information that they are finished, etc. Is there any way to do the same thing in maple?

 

 

Hi!I am running some grid computations and I found that I could speed up my computations if my nodes could share some partial results. It seems that Grid:-Send and Grid:-Receive is almost perfect. The problem is that Grid:-Receive blocks the computations where I cannot ensure that a message will ever be send. I've tried to run Grid:-Receive on a thread in an possible infinite loop but it still blocks.

Some pieces of code below:

SignatureReciever:=proc(SigContainer::uneval,stopValue::uneval)
  while eval(stopValue) do
    SigContainer := eval(SigContainer) union {convert(Grid:-Receive(),string)};
  end do;
end proc:

SendMessage:=proc(message::string, id::integer)
  Threads[Seq](proc(i) if i <> id then Grid:-Send(i,message) end if end proc,i=0..Grid:-NumNodes()-1);
end proc:

In the main procedure run on a node I have

Threads:-Create(SignatureReciever('Signatures','stopValue'));

....

....

SendMessage(signature,id);

....

....

stopValue := false;

 

Do you have any suggestions how to solve my problem?

in this code count.mw the error is about the dsolve between do and end do  but the dsolve actually works and can give me the value I want if there is no cycle outside like this count......mw , there is no big difference between two code about the dsolve funtion except the one in cycle is writen together not in several lines, why it happens and how to fix it?

Hello dears! Hope everything going fine with you. I have faced problem while solving the system of equations using fsolve command please find the attacment and fixed my problem.

I am very thankful to you for this favour. 

VPM_Help.mw

Mob #: 0086-13001903838

I am trying to use Compiler:-Compile with a generated function having a Vector as an argument. My function is (in a simplified form)

Mapt:=proc (pv) options operator, arrow; rtable(1 .. 6, {1 = .998026692438229*pv[1]-.605526643146912*pv[2]+0.154549004943741e-1*pv[6]+0.140818440886566e-5*pv[5], 2 = 0.651134546344795e-2*pv[1]+.998026692438228*pv[2]-0.510903331894809e-1*pv[6]+0.229399145141077e-8*pv[5], 3 = -.500000000000002*pv[3]-5.95856898901206*pv[4], 4 = .125869147673385*pv[3]-.499999999999996*pv[4], 5 = 0.510903331894806e-1*pv[1]-0.154549004943901e-1*pv[2]-40.6778361021594*pv[6]+.999998210424947*pv[5], 6 = .999998210424947*pv[6]-0.229399145141220e-8*pv[1]-0.140818440886565e-5*pv[2]+0.897571581395136e-7*pv[5]}, datatype = anything, subtype = Vector[column], storage = rectangular, order = Fortran_order) end proc;

Since this returns a Vector it cannot be compiled as is. So I split off the first output element (with the idea to later on do this with the others as well):

xpr:=eval(Mapt(<pv[1],pv[2],pv[3],pv[4],pv[5],pv[6]>))[1];
f1:=unapply(xpr,pv);
f1(<0.001,0.001,0,0,0,0>); # test f1: works
          0.000392500049291317

sf1:=Compiler:-Compile(f1); # this works, too

sf1(<0.001,0.001,0,0,0,0>); # but this fails
Error, (in sf1) invalid input: expecting a hardware float[8] rtable, but received 1


The examples in the Helpfile run so I think my installation is ok (my old Maple 15 won't even run the examples, but that is a different story). I have been banging my head against the wall here, trying many different ways, but none of them successfull. Worse, I do not understand the error message at all. Test program attached.

Mac OS X 10.10.5

Thanks for any hint,

M.D.

Compiler.mw

hi.i encounter with another error for solving couple equations.

bcs := {f1(0) = 0, f1(L) = 0, f2(0) = 0, f2(L) = 0, f3(0) = 0, f3(L) = 0, ((D@@1)(f2))(0) = 0, ((D@@1)(f2))(L) = 0, ((D@@1)(f3))(0) = 0, ((D@@1)(f3))(L) = 0}; sys := subs(omega^2 = omega2, {PDE[111], PDE[222], PDE[333]}); sys2 := PDEtools:-dchange({x = L*y, f1(x) = g1(y), f2(x) = g2(y), f3(x) = g3(y)}, sys, [g1, g2, g3, y]); indets(sys2, specfunc(diff)); solve(sys2, {diff(g3(y), `$`(y, 4)), diff(g1(y), y, y, y), diff(g2(y), y, y, y, y)}); sys3 := subs(omega2 = 10^19*omega3, sys2); bcs3 := {g1(0) = 0, g1(1) = 0, g2(0) = 0, g2(1) = 0, g3(0) = 0, g3(1) = 0, ((D@@1)(g2))(0) = 0, ((D@@1)(g2))(1) = 0, ((D@@1)(g3))(0) = 0, ((D@@1)(g3))(1) = 0}; extra_bcs := `minus`({seq(seq(((D@@i)(g1))(a), i = 0 .. 1), a = 0 .. 1), seq(seq(((D@@i)(g2))(a), i = 0 .. 1), a = 0 .. 1), seq(seq(((D@@i)(g3))(a), i = 0 .. 3), a = 0 .. 1)}, `~`[lhs](bcs3)); dsys4 := {bcs3, sys3}; ds := dsys4[1]; indets(dsys4[1], specfunc(diff)); solve(dsys4[1], {diff(g3(y), `$`(y, 4)), diff(g1(y), y, y, y), diff(g2(y), y, y, y, y)}); newsys := {ds[2], ds[3], diff(ds[1], y)}; indets(newsys, specfunc(diff)); S := solve(newsys, {diff(g1(y), `$`(y, 3)), diff(g2(y), `$`(y, 4)), diff(g3(y), `$`(y, 4))}); nops(%); bcs2 := eval[recurse](convert(ds[1], D), `union`({y = 0}, bcs3)); nops(`union`(bcs3, {bcs2}));

Error, (in simpl/eval) numeric exception: division by zero

division_by_zero.mw

please help.thanks..

hi.how i can allocate infinite value for a parameter such as N ,which is attached below ( N := infinite) .i encounter with error.please see it and help

thanks..

 

restart; Digits := 55; a := 0; m := 1; n := 1; x[0] := 0; a := 0; h1 := proc (theta) options operator, arrow; cos(n*theta) end proc; h3 := proc (theta) options operator, arrow; cos(n*theta) end proc; h2 := proc (theta) options operator, arrow; sin(n*theta) end proc; N := infinite; `#mover(mi("z"),mo("&circ;"))` := z+z__c; z__c := (1/2)*h; `&lambda;__c` := E__c*`&upsilon;__c`/(-`&upsilon;__c`^2+1); `&mu;__c` := E__c/(2*(1+`&upsilon;__c`)); `&eta;__c` := E__c/(-`&upsilon;__c`^2+1); `&lambda;__m` := E__m*`&upsilon;__m`/(-`&upsilon;__m`^2+1); `&mu;__m` := E__m/(2*(1+`&upsilon;__m`)); `&eta;__m` := E__m/(-`&upsilon;__m`^2+1); E__m := 42.9*10^9; `&upsilon;__m` := .325; `&rho;__m` := 6020; E__c := 170*10^9; `&upsilon;__c` := .25; `&rho;__c` := 4640; h := 10^(-9); R := 10*h; L := 20*R; `&ell;` := 0; f := 0; `&epsilon;__r` := 0; `&epsilon;` := 8.8541878176*10^(-12)*`&epsilon;__r`; f__z := 0; `f__&theta;` := 0; f__x := 0; lambda := proc (`#mover(mi("z"),mo("&circ;"))`) options operator, arrow; (`&lambda;__m`-`&lambda;__c`)*(`#mover(mi("z"),mo("&circ;"))`/h)^N+`&lambda;__c` end proc; mu := proc (`#mover(mi("z"),mo("&circ;"))`) options operator, arrow; (`&mu;__m`-`&mu;__c`)*(`#mover(mi("z"),mo("&circ;"))`/h)^N+`&mu;__c` end proc; rho := proc (`#mover(mi("z"),mo("&circ;"))`) options operator, arrow; (`&rho;__m`-`&rho;__c`)*(`#mover(mi("z"),mo("&circ;"))`/h)^N+`&rho;__c` end proc; eta := proc (`#mover(mi("z"),mo("&circ;"))`) options operator, arrow; (`&eta;__m`-`&eta;__c`)*(`#mover(mi("z"),mo("&circ;"))`/h)^N+`&eta;__c` end proc; `D__1,0` := int(eta(`#mover(mi("z"),mo("&circ;"))`), z = -z__c .. h-z__c); `D__1,1` := int(eta(`#mover(mi("z"),mo("&circ;"))`)*z, z = -z__c .. h-z__c); `D__1,2` := int(eta(`#mover(mi("z"),mo("&circ;"))`)*z^2, z = -z__c .. h-z__c); `D__3,0` := int(lambda(`#mover(mi("z"),mo("&circ;"))`), z = -z__c .. h-z__c); `D__3,1` := int(lambda(`#mover(mi("z"),mo("&circ;"))`)*z, z = -z__c .. h-z__c); `D__3,2` := int(lambda(`#mover(mi("z"),mo("&circ;"))`)*z^2, z = -z__c .. h-z__c); `D__5,0` := int(lambda(`#mover(mi("z"),mo("&circ;"))`), z = -z__c .. h-z__c); `D__5,1` := int(lambda(`#mover(mi("z"),mo("&circ;"))`)*z, z = -z__c .. h-z__c); `D__5,2` := int(lambda(`#mover(mi("z"),mo("&circ;"))`)*z^2, z = -z__c .. h-z__c); `I__1,0` := int(rho(`#mover(mi("z"),mo("&circ;"))`), z = -z__c .. h-z__c); `I__1,1` := int(rho(`#mover(mi("z"),mo("&circ;"))`)*z, z = -z__c .. h-z__c); `I__1,2` := int(rho(`#mover(mi("z"),mo("&circ;"))`)*z^2, z = -z__c .. h-z__c); with(Student[Calculus1])

[AntiderivativePlot, AntiderivativeTutor, ApproximateInt, ApproximateIntTutor, ArcLength, ArcLengthTutor, Asymptotes, Clear, CriticalPoints, CurveAnalysisTutor, DerivativePlot, DerivativeTutor, DiffTutor, ExtremePoints, FunctionAverage, FunctionAverageTutor, FunctionChart, FunctionPlot, GetMessage, GetNumProblems, GetProblem, Hint, InflectionPoints, IntTutor, Integrand, InversePlot, InverseTutor, LimitTutor, MeanValueTheorem, MeanValueTheoremTutor, NewtonQuotient, NewtonsMethod, NewtonsMethodTutor, PointInterpolation, RiemannSum, RollesTheorem, Roots, Rule, Show, ShowIncomplete, ShowSolution, ShowSteps, Summand, SurfaceOfRevolution, SurfaceOfRevolutionTutor, Tangent, TangentSecantTutor, TangentTutor, TaylorApproximation, TaylorApproximationTutor, Understand, Undo, VolumeOfRevolution, VolumeOfRevolutionTutor, WhatProblem]

(1)

NULL

 

 

infinite.mw

Assume we have a sreach with 10 for, for example

answer=0:

for i[1] from 1 by 1 to 5 do

    for i[2] from 1 by 1 to 5 do 

        ...

        if .... then answer=1: print(i[1],...,i[10]); "quitting the search"

        ...

     end do

end do

If I write break at qutting part, it will only exit from one for, one idea is putting if answer=1 break before end do of the rest for, that is why I used the local extra variable "answer" but is this the best idea? Any better idea which contains checking less if is apprecied.

Tengo una figura obtenida con ScatterPlot3D a partir de una Matriz de 3 dimensiones ( X,Y,Z ). ¿ Cómo puedo obtener la función polinómica z(x,y) que reprenta la superficie que se obtiene en el ScatterPlot3D ?

Hey

I have a simple question. 

In maple - when working with Ohm's Law.

Maple know how to calculate with e, but how can I show the result

I have calculated the following calculation:

(2e-4)/2

Maple returns the result:0.0001000000000

How do I maple show the result as 1e-4?

 

First 52 53 54 55 56 57 58 Last Page 54 of 72