thanks it works On Oct 27, 6:29 pm, Jason Grout <[email protected]> wrote: > On 10/27/11 8:25 PM, Eric Kangas wrote: > > > > > Well I should be more correct in what I am saying each function is the > > derivative of the one function. I tried your program but I get this > > error. > > > Code: > > x = var('x') > > f = (sin(x))**3+(sin(x))**2+sin(x)+1 > > colors = rainbow(len([0,1,..3])) > > sum(plot(derivative((f, a) , (x,0,2*pi), color = colors[i],label="Plot > > %d"%i) for i,a in enumerate([0,1,..3])) > > > Error: > > > Traceback (most recent call last): > > File "<stdin>", line 1, in<module> > > File "_sage_input_11.py", line 10, in<module> > > exec compile(u'open("___code___.py","w").write("# -*- coding: > > utf-8 -*-\\n" + > > _support_.preparse_worksheet_cell(base64.b64decode("eCA9IHZhcigneCcpCmYgPSAoc2luKHgpKSoqMysoc2luKHgpKSoqMitzaW4oeCkrMQpjb2xvcnMgPSByYWluYm93KGxlbihbMCwxLC4uM10pKQpzdW0ocGxvdChkZXJpdmF0aXZlKChmLCBhKSAsICh4LDAsMipwaSksIGNvbG9yID0gY29sb3JzW2ldLGxhYmVsPSJQbG90ICVkIiVpKSBmb3IgaSxhIGluIGVudW1lcmF0ZShbMCwxLC4uM10pKQ=="),globals()) > > +"\\n"); execfile(os.path.abspath("___code___.py")) > > File "", line 1, in<module> > > > File "/tmp/tmpchwgnX/___code___.py", line 7 > > > ^ > > SyntaxError: invalid syntax > > > Since it is a syntax error I think it is something simple that I am > > over looking. > > If you click just to the left of the syntax error in the notebook, > you'll see a more descriptive error message that tells where the error > is. It looks like the problem is just that there was an extra parentheses: > > sum(plot(derivative(f, a) , (x,0,2*pi), color = > colors[i],legend_label="Plot %d"%i) for i,a in enumerate([0,1,..3])) > > Jason
-- 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/sage-support URL: http://www.sagemath.org
