On Tue, May 27, 2008 at 2:22 PM, astozzia <[EMAIL PROTECTED]> wrote:
>
>
>
> On May 26, 1:50 pm, Friedrich Hagedorn <[EMAIL PROTECTED]> wrote:
>
>>
>> The problem is that
>>
>> In [26]: type(dvec)
>> Out[26]: <type 'list'>
>>
>> so you have to convert your 'vector' to a sympy
>>
>> In [27]: mdvec=Matrix(dvec).T
>
> great this works perfectly! I redid my definitions of the vectors and
> I simply defined dvec=diff(vec,t) and dvecM=Matrix(dvec).T
>
>
>> In [31]: mdvec*(1/x**2)
>> Out[31]:
>> ⎡           d                   d                   d       ⎤
>> ⎢-sin(φ(t))*──(φ(t))            ──(x(t))            ──(z(t))⎥
>> ⎢           dt                  dt                  dt      ⎥
>> ⎢───────────────────            ────────            ────────⎥
>> ⎢          2                        2                   2   ⎥
>> ⎣         x                        x                   x    ⎦
>>
>> (subs the x**2 by your sqrt(...))
>>
>> The In[31] must be so unconvenient because otherwise the '/' fails.
>> It seems to be a bug.
>
> I didn't have this problem though:
> I simply defined the unit vector along 'dvec' by:
>
> evec=dvecM/sqrt(s.dot(dvec,dvec))
>
> Note that I had to use the 'Matrix' and divide my the norm of the
> 'list'. Kinda weird...

Excellent. If you think you know some particular things that you know
how to improve in the sympy interface, please let us know, either with
or without a patch (both is very welcome).

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to