MaplePrimes Questions

I am working on a project in dynamical system and I am to apply Pontryagins maximum principle of control. i have coded the control equations but it shows an error message "Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 7, got 6". What could be the possible problem?

I wish to add tick marks to a 3D plot of a matrix.

B:=Matrix(10, 10, [[0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0]]):

Below, I draft a plot of this adjacency matrix B . I have adjusted  the position of the domain graph ticks for the x and y axes to be letters at the midpoints of the matrix elements:

tickList := [1.5 = "W", 2.5 = "P", 3.5 = "K", 4.5 = "C", 5.5 = "Y", 6.5 = "F", 7.5 = "X", 8.5 = "H", 9.5 = "T", 10.5 = "E"];

tickmarks = [tickList, tickList, tickList];

matrixplot(B, axes = [0 .. 12, 0 .. 12, 0 .. 12], heights = histogram, axes = boxed, title = "Above adjacency matrix B - axis order 1-10 \n Basis set: {W,P,K,C,Y,F,X,H,T,E}", labels = ["from", "to", ""], orientation = [0, 0, 0], tickmarks = [tickList, tickList, tickList]);

BUT I would like the z-axis not to be the above letters but instead the real (or integer) values of the matrix elements.  How should I do this, while retaining the x and y axes labels as letters located at the ticklist above.

Please can someone help?

Melvin

Hi,

I use the plots:-shadebetween( ) command quite a bit to visualize volume under a surface over a planar rectangular region. Is there a way, using this same command, to see said volume over a non-rectangular region? For example, the region bounded above by z = x^2 + y^2, having a triangle base 0<=x<=1, 0<=y<=x. If this command does not allow for this, is there some other solution?

Thanks!

Not sure why I need to invoke the simplify command here, shouldn't the immediate simplification occur?


                  

simplify(%)
                   

However, it does work algebraically


                 

                    

 

My goal is to generate incremental values of a function to plot using dataplot. Why does the first example generate numeric values in the Vector and the second example does not?

fenq := f -> 2.1^(f+1):
pf := Vector(5, fenq)
                             [  4.41   ]
                              [  9.261  ]
                         pf := [ 19.4481 ]
                              [40.84101 ]
                             [85.766121]
fseqn := (Se, f) -> Se^(f+1):
psf := Vector(5, fsenq(2.1, j))
 

I can plot the first data set using dataplot(pf). I cannot plot the second data set.

Hi, I have been looking at various questions which are similar. But, I could not exactly what I am looking for.

https://www.mapleprimes.com/questions/99679-Removing-Elements-In-A-List

In the above link it is useful to remove elemets of specific type(identical in two lists). I am looking for removing elements from list with specific Index.

L := [1,1,a,c,1];
indexList:=[3,5]

Now based on IndexList I would like to remove the elements from L. That is I want to delete L[IndexList[1]] and L[indexList[2]]. I have tried to do it using

remove(has, L, L[indexList]);  

It is working when there are no identitical elements. In my case it fails to delete exact exlemens.

subs(seq(A[indexList[i]] = NULL, i = 1 .. nops(indexList)), A); Both are working in same way. Not suitable when having identical elements in a list
How one could delete(remove) elements based on index??

Hi,

I'm very new at maple and trying to understand its engine, but it is really hard sometimes when it doesn't make sense what it is doing. I have a function that gives me

com2(e,e,f)=eh+he

and then I would like to substitute eh into <1,0> and he into <0,1>, so I write

subs({eh=<1,0>, he=<0,1>}, com2(e,e,f))

which gives me the following answer

eh+he

Here comes the confusing part. When I plug in eh+he directly into the subs thing I get

<1,1>

Why are these two outputs different from each other? To clarify, why is subs({eh=<1,0>, he=<0,1>}, com2(e,e,f))=/=subs({eh=<1,0>, he=<0,1>}, eh+he)?

Is there a way to program this:

I have to write an equation like this (x1+x2)*(x1+x3)*(x2+x3)=0. Left side is a combination, k=2 and n=3 so the number of terms is 3. For small number of terms this is not a problem to type, but if I have x1,x2,x3,x4,x5,x6, the number of combinations is 15 so it is complicated. Is there a way how to program something like this in Maple or I have to do it manually?

Thanks!

Hello,

I have two function :

And

 

A={g(R,L)=1}=

(I will call that L : L0=h(R))

 

 

So I want to represent f(A) in 3D

So I tried 

It does not work, and I do not see how I could do otherwise...

 

Thank's in advance !

hi.

According to the fhgure attaceh how i can gain the equation (2-27) . I write the equation (2-26) in maple but I couldnot to gain that result.

If possible to reach equation via maple?

Thanks

diff.mw
 

restart

FC := (1/2)*W_m^2*(c1*x^2+c2*y^2)+(E.(h^2))*W_m^2*(sum(An*((sinh(n*Pi/lambda)+n*Pi*cosh(n*Pi/lambda)/lambda)*cosh(2*n*Pi*y/a)-2*n*Pi*y*sinh(n*Pi/lambda)*sinh(2*n*Pi*y/a)/a)*cos(2*n*Pi*x/a)/(n^2*(sinh(n*Pi/lambda)*cosh(n*Pi/lambda)+n*Pi/lambda))+Bn*((sinh(n*Pi*lambda)+n*Pi*lambda*cosh(n*Pi*lambda))*cosh(2*n*Pi*x/b)-2*n*Pi*x*sinh(n*Pi*lambda)*sinh(2*n*Pi*x/b)/b)*cos(2*n*Pi*y/b)/(lambda^2*n^2*(sinh(n*Pi*lambda)*cosh(n*Pi*lambda)+n*Pi*lambda)), n = 1 .. n))

Warning,  computation interrupted

 

S := diff(FC, x); SS := diff(S, x)

g := subs(x = (1/2)*a, SS)

0

(1)

coeff(g, sinh(n*Pi/lambda))

0

(2)

``


 

Download diff.mw

The command print placed within a while loop does not produce any printout. How do I  make MAPLE to produce  it?

I am trying to animate two variables in a 3D plot. Basically I would like to combine these two animations into one simultaneous animation:

animate(plot3d, [[y, x, (1/3)*Pi], x = 0 .. 2*Pi, y = 0 .. R, coords = spherical, scaling = constrained], R = 0 .. 5)

and

animate(plot3d, [[y, x, (1/3)*Pi], x = 0 .. p, y = 0 .. 5, coords = spherical, scaling = constrained], p = 0 .. 2*Pi)

so that both animations start and end simultaneously. Is this possible?

Thanks in advance.

Hi
I appreciate your help forfinding the best fitting line for a discrete series.

Starting with 1978 as base year and counting by two's the five year overage global temperature. where 

the temperature is given by the data : x[0],...,x[12] 

1) Find the best  fitting line : x[n+1]=a*x[n]+b
2) Assuming we can extrapolate, find the predicted value x[30]

 

Fitting_best_line.mw

 

Many thanks for your help.

 

Hi everybody, i want to plot the intersection volume of three inequality, how can i do it?

 

restart

d1:=3:d2:=3:d3:=5:

plots:-implicitplot3d([x^2+y^2+z^2<d1^2,(x-3)^2+y^2+z^2<d2^2,x^2+y^2+(z-4)^2<d1^2],x=-5..5,y=-5..5,z=-5..5,style= wireframe)

 

 


 

Download plot.mw

Hi,

I am trying to solve the equation below. First method was subbing in all the parameters into the equation and the second method is plugging all the parameters straight into the equation. As you can see below, they give different results. Can someone please help me? I've been scratching my head for the past hr trying to figure out what am I doing wrong.

Method 1:

Y1 := P*b*x*(-b^2+l^2-x^2)/(6*l*E*I)     

maxdeflection := subs(P = 60000, b = 2050, E = 16000, I = 3062827708, l = 6600, x = (50/3)*sqrt(47229), Y1)

=-(77224295347218906250/297)*sqrt(47229)

 

Method 2:

Y2 := (50/3)*(60000*2050)*sqrt(47229)*(6600^2-((50/3)*sqrt(47229))^2-2050^2)/(16000*(6*6600)*3062827708)

=(50426796875/1819319658552)*sqrt(47229)

 

Thank you!

First 758 759 760 761 762 763 764 Last Page 760 of 2426