Bendesarts

440 Reputation

10 Badges

14 years, 273 days

MaplePrimes Activity


These are questions asked by Bendesarts

Hello,

I have .mla. package and I would like to create the source code associated to this package.

In the past, you have also help me to obtain the source code of procedure of the module.

Here the post where Carl Love has helped me :

http://www.mapleprimes.com/questions/203676-Open-A-Maple-Package

How can I do to create the complete source code of package directly ?

Is there a direct way enabling to not have to read one procedure by one procedure but to obtain the code source for all the package ?

Thank you for your help

 

 

Hello,

In the creation of package wrapping some procedures, may you tell me the differences between using a table or a module so as to wrap the procedures ?

In my case, it seems to me that table is more convenient since I can create with table packages while keeping my program with a structure of section, subsection, ...

But, I'm a beginner in the use of packages. Consequently, I'm very interested in your opinions on this question.

Thanks a lot for your help

Hello,

In a mechanical model, I would like to use the letter Psi. However, when I use it, i have a small issue with some index which disappear.

Here the code I put at the beginning of my worksheet to be able to use the Psi letter

constants:= ({constants} minus {Psi})[]:
`evalf/Psi`:= proc() end proc:
`evalf/constant/Psi`:= proc() end proc:
unprotect(Psi);


With the following code,

ChgtVariables:={seq(psi[i](t)=Psi[i](t)-gamma0(t),i=1..4)};

I obtain the following result:

 

The index with Psi has disappear.

However, if i use the code:

ChgtVariables:={seq(psi[i](t)=PSI[i](t)-gamma0(t),i=1..4)};

I obtain the following result:

There is no problem of index with PSI.

Do you have a idea why the index has disappeared ? How can I do to use the Psi letter with a index ?

PS: the code associated attached here:

Psi.mw

Thank you for your help

Hello,

I would like to symbolically determine the rank of a jacobian matrix. In the help, I have seen that the Rank function of the LinearAlgebra can be used for this purpose. However, when I use this function, the function doesn't allow to find the different singularities that can occur on my jacobian matrix.

Here a exemple of a jacobian matrix that I obtain on a slidercrank mechanism:

Phi := Matrix(2, 3, {(1, 1) = -l1*sin(theta(t)), (1, 2) = -1, (1, 3) = l2*cos(beta(t)), (2, 1) = l1*cos(theta(t)), (2, 2) = 0, (2, 3) = l2*sin(beta(t))})

The rank of this jaobian (Phi) gives 2 whatever the values of theta(t) and beta(t). However, if the values of  theta(t) and beta(t) are :theta(t)=Pi/2,beta(t)=0. The rank shouldn't be 2 but 1.

Is a way to obtain the symbolic calculation of the rank of a jacobian matrix which can distinguish different cases following the values of the parameters ? In others words, my dream will be to have a Rank function (or another algorithm) which can gives :
the rank is 2 if theta(t) different of Pi/2 [Pi] and beta(t)=0 [Pi] 
and otherwise 1 if ...
and perhaps 0 if ...

Thanks a lot for your help.

I let a piece of code with an example of calculation of the rank

RankMatrix.mw

Hello, 

I look for a maple function / or a piece of code which enable to do repeated substitutions. In other words, repeat substitutions until there is no more possible substitution.

How can I do to make repeated substitutions ?

Here a example I would like to solve with maple

Equation on which I would like to conduct variables changements: 

Code:
eq := sin(psi[1](t)+gamma0(t))*cf+sin(gamma0(t)+theta[1](t)+psi[1](t))*mf-sin(gamma0(t))*hf-cos(gamma0(t))*lf+xp[1](t) = sin(psi[2](t)+gamma0(t))*cf+sin(gamma0(t)+theta[2](t)+psi[2](t))*mf-sin(gamma0(t))*hf-cos(gamma0(t))*lf+xp[2](t)


Definition of variables changement :

Code:
ChgtVariables:=psi[1](t)=Psi[1](t) - theta[1](t) + gamma[1](t),psi[2](t)=Psi[2](t) - theta[2](t) + gamma[2](t);psi[3](t)=Psi[3](t) - theta[3](t) + gamma[3](t),psi[4](t)=Psi[4](t) - theta[4](t) + gamma[4](t),theta[1](t)=Theta[1](t)+gamma[1](t),theta[2](t)=Theta[2](t)+gamma[2](t),theta[3](t)=Theta[3](t)+gamma[3](t),theta[4](t)=Theta[4](t)+gamma[4](t);


Application of subs function:

Code:
subs(ChgtVariables,eq);

The problem is that only one step of substitutions is conducted.

Here the expected result :

(sin(theta[1](t))-theta[2](t))*cf - (sin(gamma[1](t)-sin(gamma[2](t)))*mf  + xp[2](t) - xp[1](t) = 0

Thanks a lot for your hemp

First 7 8 9 10 11 12 13 Last Page 9 of 33