| Hello, I get the following error message: I added the "..." manually for this post. Obviously I make a severe problem in getting the numerical solution of this simple equation. Maybe you can help me in getting a numerical solution for an equation. Btw. I get the same error message when I try the example given in the sage tutorial on page 14 ([[s[p].n(30),.....) Thanks in advance!
Just so you know, it's possible to make things look like code by indenting them four space - no <hr> or <br> needed - or by highlighting a region and clicking the button that looks like 101010.
kcrisman (Apr 02 '11) |
| It helps to go step-by-step. In this case, the error message "unable to convert x (=x) to an integer" is telling you that something is a symbolic variable (x) which you're trying to treat as something else: Looks good, now we can solve: and you see that sol isn't a dictionary, it's a list of dictionaries. So sol[x] can't work, because it's trying to take the "x-th" element of the list, when really you want one of the entries (0 or 1, as Python/Sage starts counting from 0 instead of 1): Does that make sense? |
Asked: Apr 02 '11
Seen: 442 times
Last updated: Apr 02 '11
powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.