Bendesarts

380 Reputation

10 Badges

10 years, 232 days

MaplePrimes Activity


These are questions asked by Bendesarts

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

Hello,

I try to simplify a system of 6 trigonometric equations and then to extract the 3 first equations.

When I conduct my calculations, It seems that that I have some troubles with some index.

There is a term with "table" which is not evaluated.

Do you have ideas why the last equations in my code have a table inside and consequently can not be evaluated?

I attached my code

example.mw

Thank you for your help.

 

 

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