MaplePrimes Questions

I am not sure I know what is going on. I expected to obtain the controllable canonical form in this example, but I am not. May be I am not using it correctly. 

Given A,B, I wanted to transfer the state space to controllable canonical form

http://www.maplesoft.com/support/help/Maple/view.aspx?path=DynamicSystems%2FSSTransformation

In this form, the A matrix will have 1 on the super diagonal, and the last row will have the coefficients of the charaterestic polynomial in reverse order with a minus sign. The B matrix will have all zeros, except for the last entry.  This is what the example on the above page actually shows. 

But when I tried it on my A,B, I do not get this form for the new B matrix. Here is a MWE

restart;
with(DynamicSystems):
A:=Matrix([[0,0,1,0],[0,0,0,1],[-2,-1,0,0],[1,-1,0,0]]);
B:=Matrix([[0],[0],[1],[0]]);
C:=Matrix([[0,0,0,0]]):
D0:=Matrix([[0]]):
sys:=StateSpace(A,B,C,D0): #just to see the polynomial
CharacteristicPolynomial(sys, s);


SSTransformation(A,B,C,D0,form=ControlCanon,output=['A','B']);

The above should be

I am sure I am doing something wrong, but what?

Maple 18.01, windows 7

 

 

Below is the function that I have.

 

f := (t-1)^(1/3)

p:=2;

b[n] := 2/p*(Int(f*sin(2*Pi*n*t/p), t = 0 .. p))

 

I also included a picture below to show what it is doing. Some help would be greatly appreciated. All I need to know is why maple doesn't want to evaluate bn?

 

Maple Code

 

If I have a function such as fk := exp(-x^2)*sin(Pi*x)  and I want to:

Create an animation to illustrate the differences between line thicknesses and then after the thicknesses, illustrate line styles. I also need to add the line thickness and style as text to the animations.

How would I go about doing this?

 

Hello, sorry for may asking the most simple question ever, but we cant find a solution.

If we do have a simple eqation like this:

U=I*R

how to solve vor R=? using maple?

Okay, we do feel really stupid for asking that and okay we can do that by hand but how to use maple for this, especially when it becomes more complex? Are there any examples of this kind?

Tahnks a lot Eve and Andrew

So if I have a procedure like 

with(GraphTheory)

tneighbors := proc (G::Graph)

local numvertices::integer, i::integer, currentvertex;

numvertices := nops(Vertices(G));

for i to numvertices do

currentvertex := Vertices(G)[i];

if nops(Neighbors(G, currentvertex)) = 2 then print(currentvertex)

end if;

end do;

end proc;

How do I make it so the output gets returned as a set?

For example, if I do  twoneighbors(G); and get
1

7

4

How do I make it so the output is listed as a set like {1,4,7}? Thanks.

Hello,

I have a question about the CycleIndexPolynomial command contained in the Group Theory package. The answers it gives for computing the cycle index of the dihedral group and symmetric group appear to has a missing term in its answer. If my knowledge of how the cycle index is computed, it appears to be missing a term that occurs when cycles of length greater than one is combined with terms with cycles of length one. For example, here is what I get when I use Maple 18 on my Windows 8.1 machine to compute the cycle index of the following dihedral groups:

 

> with(GroupTheory):

> CycleIndexPolynomial(DihedralGroup(3), [x || (1 .. 3)]);

 

 

> CycleIndexPolynomial(DihedralGroup(4), [x || (1 .. 4)]);

 

 

> CycleIndexPolynomial(DihedralGroup(5), [x || (1 .. 5)]);

 

 Now if you compare these answers from the cycle index I found at the link:

 http://mathworld.wolfram.com/DihedralGroup.html

 you will see the answers is given as

 

  =

 

 

 

 =

 

 =

 

The disagreement occurs at the terms that contain representations of cycles of length two x2 multiplied to the one-cycle representation term x1.

 

The same issue happens with the symmetric group. Here is what I get for the following Maple commands:

 

> with(GroupTheory):

 

> CycleIndexPolynomial(SymmetricGroup(3), [x || (1 .. 3)]);

 

 

> CycleIndexPolynomial(SymmetricGroup(4), [x || (1 .. 4)]);

 

 

> CycleIndexPolynomial(SymmetricGroup(5), [x || (1 .. 5)]);

 

 

However, as can be seen at the link

 

http://mathworld.wolfram.com/SymmetricGroup.html

 

these answers are not in agreement with these:

  =

 

 =

 

 =

 

 

Again, the difference seems to be with terms combined with the one cycle term representation x1.

 

Is there something I am not interpreting correctly? Thank you for your help.

 

Neil Sigmon

Hi!

 

Do anyone know the keyboard shortcut to the standard subsribt in Maple 18 on a macbook with OS X? 

 

Thanks,

Mads

 in maple 12, it can not read table T in another worksheet.

i just want to read table T whenever i want during the running of big loop in procedure manman

 

restart;
with(Groebner):
AllMatrices := proc (A::set, k::posint, n::posint)
local B, C, E:
B := [[]]:
C := proc ()
B := [seq(seq([A[i], op(B[j])], i = 1 .. nops(A)), j = 1 .. nops(B))]:
end proc:
E := (C@@(k*n))(B):
seq(Matrix(k, n, E[m]), m = 1 .. nops(A)^(k*n));
end proc:
mm := AllMatrices({0, 1}, 3, 3);
GetRing := proc(sol)
ringequation := 0;
mono1 := 0;
for j from 1 to 3 do
mono1 := 1;
for i from 1 to nops(sol[1][j]) do
mono1 := mono1*op(i, sol[1][j]);
od:
ringequation := ringequation + mono1;
od:
return ringequation;
end proc;
with(LinearAlgebra):
polylistresult := [];
for i from 1 to nops([mm]) do
sol := MatrixMatrixMultiply(Matrix([[a,b,c]]), op(i,[mm]));
sol := GetRing(sol);
polylistresult := [op(polylistresult), sol];
od:
with(Groebner):
with(Threads):
T := Table();
m := Threads[Mutex][Create]();
manman := proc(T2, m2);
indexlistresult := [];
for i from 2 to nops(polylistresult) do
for j from 2 to nops(polylistresult) do
if i < j then
for k from 2 to nops(polylistresult) do

if j < k then
print("find");
F := [polylistresult[i], polylistresult[j], polylistresult[k]];
h := HilbertSeries(F, {x, y, z}, s);
if h <> 0 then
#if not assigned(T[h]) then
print(h);
Threads[Mutex][Lock]( m2 );
T2[h] := [op(T2[h]), F];
Threads[Mutex][Unlock]( m2 );
end if:
end if:
od:
end if:
od:
od:
end proc:
manman(T, m);
Threads[Mutex][Destroy](m);

another sheet:
Threads[Mutex][Lock]( m );
for i in indices(T) do
print(i);
od:
Threads[Mutex][Unlock]( m );

Hi Maple friends.

How can I find the domain of y=sqrt(3*x-5)? or of y=1/(x+2)^2?

Thanks in advance.

Hi everyone!

I wander whether maple can solve the integral of trigonometric series with parametal N, the number of sereis, and how. The formation is showed as below. N is a  variable and 'm' belongs to 'k', 'n' belongs to 'l'.

the intergral of series and the orthogonality conditions

A := int(int(sum(sum(cos(2*k*Pi*x/a)*(1-cos(2*l*Pi*y/b))*(1-cos(2*m*Pi*x/a))*(1-cos(2*n*Pi*y/b)), k = 1 ..N), l = 1 .. N), x = 0 .. a), y = 0 .. b)

orthogonality codition 1:

OrthCondition1 := int(sum(cos(2*k*Pi*x/a)*cos(2*m*Pi*x/a), k = 1 .. N), x = 0 .. a) = (1/2)*a

orthogonality codition 2:

OrthCondition2 := int(sum(cos(2*l*Pi*x/b)*cos(2*m*Pi*x/b), l = 1 .. N), x = 0 .. b) = (1/2)*b;

 

I need to write a procedure that returns the cut vertices of a graph, but I think I'm having trouble defining my local variables. This is what I have so far.  I think my error might be in defining H since that's the line the error message I get keeps referencing.  Am I defining H incorrectly or in the wrong spot? Any advice would be appreciated. Thanks


cutvertices := proc (G)

local numvertices::integer, currentvertex, i::integer, H;

description "Returns a set of all the cut-vertices of the given graph";

numvertices := nops(Vertices(G));

for i to numvertices do

currentvertex := Vertices(G)[i]

H:=DeleteVertex(G, currentvertex)

 

if nops(ConnectedComponents(G)) = nops(ConnectedComponents(H)) then print(currentvertex)

end if;

end do;

end proc:

When I open my file I got an error message says "there were problems during loading process"

and some of my text are missing.

Maple Worksheet - Error

Download quant_hw_5.mwquant_hw_5.mw

Download quant_hw_5.mw

Can anyone help me,please

Hi,

I have a non linear ode with sinosoial term, (sin(x)).

How can we Analyse the system and plot the bifurcation diagram:

x'=r*x-sin(x);

Thank you very much for your help.

 

Hello,

One again, I have a problem to solve some bifurcation problem using maple.

Discuss the existance of Equilibria and determine any possible bifurcation.

x'=r*x-ln(x+1);

where $r$ is a parameter.

many thinks for your help and suggestion.

 

 

 

i want to solve an equation by fsolve but i cant assign a value as an input for next step!

please help me

s := fsolve(G), x = -1 .. 1     

s := .1449607418, x = -1 .. 1  

 a:=s+1  

Error, invalid input: subs received .1449607418, which is not valid for its 1st argument                  

First 1372 1373 1374 1375 1376 1377 1378 Last Page 1374 of 2429