Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

How can I export data from the plot? Following is my Maple code.

 

restart;
with(PDEtools);
v_0 := 1;
vstar := 10;
r_0 := 1;
k := 0.1;
m := 0.1;
PDE := diff(v(r, t), t) = k*(diff(v(r, t), r, r) + diff(v(r, t), r)/r);
                                                / d         \
                           /  2         \   0.1 |--- v(r, t)|
          d                | d          |       \ dr        /
  PDE := --- v(r, t) = 0.1 |---- v(r, t)| + -----------------
          dt               |   2        |           r        
                           \ dr         /                    

ans := pdsolve(PDE, HINT = f(r)*g(t));
                             /                            
                             |                            
                             |                            
ans := Typesetting:-mcomplete|vApplyFunction(rt)equalsf__1
                             |                            
                             |                            
                             \                            

                                              //               
                                              ||               
                                              ||DifferentialD  
  ApplyFunction(r) f__2ApplyFunction(t) where ||-------------- 
                                              ||DifferentialDt 
                                              \\               

  f__2ApplyFunction(t)equals0.1 f__2ApplyFunction(t) _c[1]

               2                                                 
  DifferentialD                                                  
  --------------- f__1ApplyFunction(r)equals1. f__1ApplyFunction(
                2                                                
  DifferentialDr                                                 

                /DifferentialD                      \//  
             1. |-------------- f__1ApplyFunction(r)|||  
                \DifferentialDr                     /||  
  r) _c[1] - ----------------------------------------||, 
                                r                    ||  
                                                     \\  

                    /[           /                           [ /
                    |[           |                           [ |
                    |[           |                           [ |
  Typesetting:-_Hold|[PDESolStruc|v(r, t) = f__1(r) f__2(t), [< 
                    |[           |                           [ |
                    |[           |                           [ |
                    \[           \                           [ \

   d                               
  --- f__2(t) = 0.1 f__2(t) _c[1], 
   dt                              

                                       / d         \\ ]\]\\
    2                               1. |--- f__1(r)|| ]|]||
   d                                   \ dr        /| ]|]||
  ---- f__1(r) = 1. f__1(r) _c[1] - ---------------- >]|]||
     2                                     r        | ]|]||
   dr                                               | ]|]||
                                                    / ]/]//


build(ans);
                  /1         \             /           (1/2)  \
v(r, t) = c__3 exp|-- _c[1] t| c__1 BesselJ\0, (-_c[1])      r/
                  \10        /                                 

             /1         \             /           (1/2)  \
   + c__3 exp|-- _c[1] t| c__2 BesselY\0, (-_c[1])      r/
             \10        /                                 


design;
BC1 := eval(v(r, t) - v_0 = 0, r = 20);
                    BC1 := v(20, t) - 1 = 0

BC2 := D[1](v)(0, t) = 0;
                    BC2 := D[1](v)(0, t) = 0

NULL;
IC := v(r, 0) = v_0 + (vstar - v_0)*exp(-0.5*(r - r_0)^2/m^2)/(m*sqrt(2*Pi));
                                    (1/2)    /            2\
   IC := v(r, 0) = 1 + 25.38853126 2      exp\-50. (r - 1) /

conds := {BC1, BC2, IC};
              /                  
    conds := { v(20, t) - 1 = 0, 
              \                  

                                 (1/2)    /            2\  
      v(r, 0) = 1 + 25.38853126 2      exp\-50. (r - 1) /, 

                       \ 
      D[1](v)(0, t) = 0 }
                       / 


answer:=pdsolve(PDE,conds,HINT=);
Error, invalid =
Typesetting:-mambiguous(answerAssignpdsolveApplyFunction(PDEcomma

  condscommaTypesetting:-mambiguous(HINTequalslowast, 

  Typesetting:-merror("invalid =")))semi)


u := r -> v_0 + (vstar - v_0)*exp((-1)*0.5*(r - r_0)^2/m^2)/(m*sqrt(2*Pi));
u := proc (r) options operator, arrow, function_assign; 

   v_0+(vstar-v_0)*exp(-.5*(r-r_0)^2/m^2)/(m*sqrt(2*Pi)) end proc


plot(u(r), r = 0 .. 10);

conds := {BC1, BC2, IC};
              /                  
    conds := { v(20, t) - 1 = 0, 
              \                  

                                 (1/2)    /            2\  
      v(r, 0) = 1 + 25.38853126 2      exp\-50. (r - 1) /, 

                       \ 
      D[1](v)(0, t) = 0 }
                       / 


BCs := {BC1, BC2};
          BCs := {v(20, t) - 1 = 0, D[1](v)(0, t) = 0}

pde_solve = pdsolve(PDE, BCs, IC);
solution := pdsolve(PDE, conds, numeric);
                  solution := _m1440390954528

t1 = 0 .. 10;
r1 = 0 .. 10;
solution, t1, r1;
                        solution, t1, r1

sol := pdsolve(PDE, conds, numeric, time = t, range = 0 .. 20, spacestep = 0.1, timestep = 0.1);
                     sol := _m1440421519392

sol:-animate(t = 0 .. 20, frames = 100);

M := sol:-value();

sol:-plot3d(r = 0 .. 10, t = 0 .. 20);

I have give this below fit command my data is only continous data either positive or negative float data. Their never any complex number at all.

I use the below fit command

Error, complex argument to max/min

It can be observed it is running into error in C1 I dont know why can someone suggest where should I check and why is this happening kind help.   In Excel we can see the intercept coming big.

 

I attach the toycode to see the error I get too

toycode.mw

I want to know the exponent of one particular factor of an integer. For example:

k:=24;

ifactor(k) = (2)^3(3)

and I want to write a module to extract the exponent of (3) for any arbitrary k.

I can't select for the presence of 3 because it will pick up the factor (2)^3 and then it gets complicated to decide that I don't want this factor anyway.

If I somehow manage to select the factor (3) using "op" and scanning through each factor in turn, then substitute 3=x, it turns out that degree(%,x) doesn't work because the factor x is enclosed in brackets; similarly trying

log(%,3) fails for the same reason.

There has to be a simple way, but I just don't see it.

Any suggestions are appreciated.

In GraphTheory ,how do you make more than one edge between two points.

Could you help me to solve this problem for the parameter beta?

restart;

e1:= 0.5; e2:=0.2;theta:=5;yeq:=e2;

.5

 

.2

 

5

 

.2

(1)

f:=(theta*x-1)*(1-x)*(1+beta*x^2)-y;
g:=x/(1+beta*x^2); gs:=unapply(g,x);

(5*x-1)*(1-x)*(beta*x^2+1)-y

 

x/(beta*x^2+1)

 

proc (x) options operator, arrow; x/(beta*x^2+1) end proc

(2)

fs:=subs(y=yeq,f);

(5*x-1)*(1-x)*(beta*x^2+1)-.2

(3)

assumptions:=x>1/theta, x<1,beta>0,beta<1,gs(x)>e1;
solve(fs=0,x,useassumptions) assuming assumptions;

1/5 < x, x < 1, 0 < beta, beta < 1, .5 < x/(beta*x^2+1)

 

Warning, solve may not respect assumed property 'real' on 'x/(beta*x^2+1)'.

 

Error, (in type/realcons) too many levels of recursion

 

gs2:=subs(beta=0.6,gs(x));

x/(.6*x^2+1)

(4)

sol:= solve(subs(beta=0.6,fs=0),x,useassumptions) assuming x>1/theta, x<1;

.2514854589, .9665623271

(5)

subs(x=sol[1],gs2);

.2422912423

(6)

 

Download Rootsfind.mw

I put this command and It keep saying  plot(f(x), x = -0.667 .. 1.71, y = -5 .. 20, gridlines); Error, (in plot) unexpected options: [1.71 = -.667 .. 1.71, y = -5 .. 20] . How can I fix this

How can I show all the parameters in title ?

restart;

with(DEtools):with(plots):with(plottools):

 

 

sigma1:=e1*alpha: sigma2:=e2*delta:

g:=x/(1+beta*x^2);
f:=(theta*x-1)*(1-x)*(1+beta*x^2)-y;
h:=alpha*g-z-sigma1;
j:=delta*y-sigma2;

x/(beta*x^2+1)

 

(theta*x-1)*(1-x)*(beta*x^2+1)-y

 

alpha*x/(beta*x^2+1)-e1*alpha-z

 

-delta*e2+delta*y

(1)

 

 

p0:=theta->plot([1/theta,y,y=0..1],linestyle=dash,color= green):
p1:=e1->plot([x,e1,x=0....1.5],color=blue):
q0:=animate(p0,[theta],theta=2...10):
q1:=animate(p1,[e1],e1=0.1..1):
q2:=plot([1,y,y=0..1],linestyle=dash,color= green):
p3:=beta->plot([x,x/(1+beta*x^2),x=0..1.5],color=magenta);
q3:=animate(p3,[beta],beta=0..1.5):

display([q0,q1,q2,q3],view=[0..1.5,0..1]);

proc (beta) options operator, arrow; plot([x, x/(1+beta*x^2), x = 0 .. 1.5], color = magenta) end proc

 

 

 

Download animate_plots.mw

# countourplot3d piggybacks on top of plot3d.
# For the "coloring=[lowColor, highColor]", the "filledregions=true" option must be present.
# If "filledregions=true" is not present, plot3d will throw an error.
# This code shows the three cases, only one of which will work.
Note to support. I cannot add a new tag. contourplot3d should be a tag.

restart;
with(plots);
with(ColorTools);
cGr4s := Color([0.50, 0.50, 0.50]);
contourplot3d(-5*d/(d^2 + y^2 + 1), d = -3 .. 3, y = -3 .. 3, color = black, thickness = 3, coloring = [cGr4s, cGr4s], contours = [-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2]);
contourplot3d(-5*d/(d^2 + y^2 + 1), d = -3 .. 3, y = -3 .. 3, filledregions = false, color = black, thickness = 3, coloring = [cGr4s, cGr4s], contours = [-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2]);
contourplot3d(-5*d/(d^2 + y^2 + 1), d = -3 .. 3, y = -3 .. 3, filledregions = true, color = black, thickness = 3, coloring = [cGr4s, cGr4s], contours = [-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2]);

Hi all,

I am quite a rookie in using Maple.

A project is going on while I need to use previous formulas and variables defined in A.mw, while I don't want to redefine everything again in my worksheet, is there any approach to inherit everything in A.mw to my current worksheet?

How would I go about creating a tetrad of a specific signature in the Differential Geometry package. The GrahmSchmidt and NullTetrad give me orthonormal and complex null tetrads. But I was wondering if there was a way to generate a tetrad of specific signature.

The union is simple

with(plottools):
with(plots):
display([torus([1,1,1], 1, 2),torus([1,6,1], 1, 2)], scaling=constrained, lightmodel=light1, shading=zgrayscale,color=[red,red]);

but how to plot the intersection?

I have been try to code the 

mdl:-Fit(x, y, opts)
command in Deep learning package

But i feel new to that command I am making errors 

Can I get a small toy code how to call it and its output on train and test

so that i could learn

kind help please

Hello,
 i want to increase my value monotonically  . but i don't want to do it like sequence. how can i write code.

for example my value ..starts at 0...to some values i just want to increase.
help me plz

CREATING GRAPH EQUATION OF "DNA" IN CARTESIAN SPACE USING PARAMETRIC SURFACE EQUATION RUN ON MAPLE SOFTWARE

ENJOY...

 

First 91 92 93 94 95 96 97 Last Page 93 of 2097