I see numerous problems in your code snippet:
* variables v, psi_d and l (the letter ell in your definition of rp_f) are not
defined
* you define rV_ra in the first line but refer to rV_fa inside the for loop
* the list sys is not defined
The following code snippet works:
v = 1
psi_d = 1
rV_ra=vector([v, 0, 0])
omega_ra = vector([0,0,psi_d])
rp_f = vector([1,0,0])
sys = [0,0,0]
ans1=rV_ra+omega_ra.cross_product(rp_f)
for i in range (0,3):
sys[i]=[ans1[i]==rV_ra[i]]
print sys
> On Dec 2, 2014, at 8:49 AM, SiL588 . <[email protected]> wrote:
>
> Hi everybody, i'm new to sage and i'm having problems solving a two equations
> system and in particular with a for-loop assignament.
>
> Here's what i've got:
>
> rV_ra=vector([v, 0, 0])
> omega_ra = vector([0,0,psi_d])
> rp_f = vector([l,0,0])
>
> ans1=rV_ra+omega_ra.cross_product(rp_f)
> for i in range (0,3):
> sys[i]=[ans1[i]==rV_fa[i]]
>
> but it gives the following error:
> TypeError: 'module' object does not support item assignment
>
> What does it mean? It seems a pretty simple operation to me and I can't
> understand what it is that i'm doing wrong.
> Thank you very much
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/sage-support
> <http://groups.google.com/group/sage-support>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.