EverteQ

10 Reputation

2 Badges

13 years, 113 days

MaplePrimes Activity


These are questions asked by EverteQ

Hi All,

 

I have o problem with simplify. A variable cp1r has been assumed to be positive. Why simplify still has csgn(cp1r) for it? Here is my code:

tmp := subs(cp1t(t)=cp1r, cp2t(t)=cp2r, Ca[2]);
1 / 2 2
----------- |-cp2r sin(x[1]) sin(x[7]) cp1r
2 2 |
cp1r cp2r |
\

2
+ 2 cp2r sin(x[1]) cos(x[1]) cos(x[7]) sin(x[7]) cp1r +

1 / 2 2 /
-------------- \cp2r cos(x[1]) cos(x[7]) sin(x[7]) \
(1/2)
/ 2\
2 \cp1r /
2 \\\
-2 cos(x[1]) cos(x[7]) sin(x[1]) + 2 sin(x[1]) cos(x[1])//|
|
|
/
assume(cp1r > 0, cp2r > 0);
simplify(tmp);
1 / / 3 3
---------- \sin(x[1]) sin(x[7]) \-cos(x[1]) cos(x[7])
2
cp1r cp1r

+ 2 cos(x[1]) cos(x[7]) cp1r csgn(cp1r) cp1r

2 3 \ \

- cp1r csgn(cp1r) cp1r + cos(x[1]) cos(x[7])/ csgn(cp1r)/

 

should csgn(cp1r) be simplified to 1 already? What is wrong with my script?

 

Thanks 

Everett

Hi All,

 

I am working on modeling dynamics for a robot. It requires a write some long expressions into C++.  When I do it, it has some strange problem in creation of C++ code from a vector.

Here is an example of the problem. I have a multivariable polynomial term, I using coeffs to get its coefficients and corresponding unevaluated variables, which works fine. But I can't convert the vector into C++

Ca := coeffs(term, [W, Rf, Rr, dxf, rcf, rcr], 'L'):

L;                           Rf, Rr, dxf

C(L, resultname="L11", output="dSpDdx1.cpp");

Error, (in Translate) options [Rr, dxf] not recognized.

I don't know why maple thought the unevaluated variable Rr and dxf are options instead of the vector I want to convert into c++. Does any one know what I did wrong?

 

Thanks in advance.

 

Everett

Hi All,

 

I am using maple 15 for a mechanical modeling, which has some very complex trigonomitry manipulations. The

script runs fine in maple 9.5.1 under window XP. But when I try to load the script in maple 15 under window 7,

it keeps loading forever. I noticed the memory usage in window manager to approach 1GB. (I have 4 GB in my PC).

The 9.5.1 uses much small portion of the memory. Does anyone see this problem before?

Page 1 of 1