[sage-support] Re: Handling Octave functions with multiple return values?

2008-03-25 Thread mabshoff
On Mar 24, 4:26 pm, Michael <[EMAIL PROTECTED]> wrote: > What is the recommended way to handle Octave functions with multiple > return values in Sage? > > Like Magma, Octave functions can return multiple values.  Working with > such Magma functions is documented in the Sage documentation (http:/

[sage-support] Re: Histograms

2008-03-25 Thread shahab
The pylab version would be something like this: import pylab pylab.close() y = random.standard_normal((1,)) n, bins, patches = pylab.hist(y, 100) pylab.setp(patches, 'facecolor', 'g') pylab.savefig('histogram',dpi=72) pylab.close() Here is a bit more elaborate version for combining two diffe

[sage-support] Re: How to get non-axis aligned ellipsoid?

2008-03-25 Thread Jason Grout
VAkaras Liutinkevicius wrote: > How to get non-axis aligned ellipsoid? > > If I do this: > sage: a, b = var('a,b') > sage: fx = 3*cos(b)*cos(a) > sage: fy = 2*cos(b)*sin(a) > sage: fz = sin(b) > sage: P = parametric_plot3d([fx,fy,fz], (b, -pi/2, pi/2), (a, -pi, pi), > frame=False) > sage: P.show

[sage-support] How to get non-axis aligned ellipsoid?

2008-03-25 Thread VAkaras Liutinkevicius
How to get non-axis aligned ellipsoid? If I do this: sage: a, b = var('a,b') sage: fx = 3*cos(b)*cos(a) sage: fy = 2*cos(b)*sin(a) sage: fz = sin(b) sage: P = parametric_plot3d([fx,fy,fz], (b, -pi/2, pi/2), (a, -pi, pi), frame=False) sage: P.show() I get the same: sage: fx = cos(b)*cos(a) sage:

[sage-support] Re: Histograms

2008-03-25 Thread Martin Albrecht
On Tuesday 25 March 2008, William Stein wrote: > On Tue, Mar 25, 2008 at 6:44 AM, Martin Albrecht > > <[EMAIL PROTECTED]> wrote: > > This should be R's home base: > > > > # first we compute some data > > b = 10 > > st = [] > > for i in range(500): > > A = random_matrix(ZZ,160,160, x=-2**b,

[sage-support] Re: Embed arbitrary images in notebook

2008-03-25 Thread DuaneKaufman
On Mar 25, 8:36 am, "Hector Villafuerte" <[EMAIL PROTECTED]> wrote: > On Tue, Mar 25, 2008 at 7:12 AM, DuaneKaufman <[EMAIL PROTECTED]> wrote: > > [...]> I would like the image to be stored _with_ (or as part of) the > > worksheet, on the server, so it is available for anyone who views the > >

[sage-support] Re: Histograms

2008-03-25 Thread William Stein
On Tue, Mar 25, 2008 at 6:44 AM, Martin Albrecht <[EMAIL PROTECTED]> wrote: > > This should be R's home base: > > # first we compute some data > b = 10 > st = [] > for i in range(500): > A = random_matrix(ZZ,160,160, x=-2**b, y=2**b) > t = cputime() > E = A.echelon_form() > st.append(

[sage-support] Re: polynomial object and symoblic computations

2008-03-25 Thread Carl Witty
On Mar 25, 2:18 am, continuum121 <[EMAIL PROTECTED]> wrote: > Hi! > > I have a problem. Here is its formulation. I work in some polynomial > ring - lets say > R,(x,y) = PolynomialRing(QQ, 2, 'xy', order='lex').objgens() > and consider ideal in R > I = ideal(x+y^3-2,y+x^3-2) > then I calculate grob

[sage-support] Re: Histograms

2008-03-25 Thread Martin Albrecht
This should be R's home base: # first we compute some data b = 10 st = [] for i in range(500): A = random_matrix(ZZ,160,160, x=-2**b, y=2**b) t = cputime() E = A.echelon_form() st.append(cputime(t)) #now we plot a histogram using R from rpy import r r.png('histogram.png',width=640,heig

[sage-support] Re: Embed arbitrary images in notebook

2008-03-25 Thread Hector Villafuerte
On Tue, Mar 25, 2008 at 7:12 AM, DuaneKaufman <[EMAIL PROTECTED]> wrote: [...] > I would like the image to be stored _with_ (or as part of) the > worksheet, on the server, so it is available for anyone who views the > worksheet. > > I hope that is clear enough. Thanks for the suggestion though

[sage-support] Re: Embed arbitrary images in notebook

2008-03-25 Thread DuaneKaufman
On Mar 25, 7:18 am, Marshall Hampton <[EMAIL PROTECTED]> wrote: > I would be interested in learning other ways to do this, but here is > one way. You can include arbitrary html with the html command. So > for example, to show a picture of a steam engine from wikipedia you > could do: > > html

[sage-support] Re: Embed arbitrary images in notebook

2008-03-25 Thread Marshall Hampton
I would be interested in learning other ways to do this, but here is one way. You can include arbitrary html with the html command. So for example, to show a picture of a steam engine from wikipedia you could do: html('http://upload.wikimedia.org/wikipedia/commons/9/9e/ Maquina_vapor_Watt_ETSI

[sage-support] Re: polynomial object and symoblic computations

2008-03-25 Thread Marshall Hampton
If getting numerical roots is sufficient, then you might want to check out the optional phcpack package. I am working on a more full- featured interface for sage-2.11 that classifies roots of multivariable polynomial systems. Phcpack is be able to compute roots for systems where Groebner bases

[sage-support] Embed arbitrary images in notebook

2008-03-25 Thread DuaneKaufman
Hi, I have looked through the documentation for the Sage notebook, but I couldn't find any information on how to embed arbitrary images in a notebook. Let's say I have a calculation I want to illustrate, and I would like a pictorial representation of the physical system (indicating lengths, angl

[sage-support] Re: polynomial object and symoblic computations

2008-03-25 Thread David Joyner
It might work if you try coercing f = B[0] first into R2. = PolynomialRing(CC, 2, 'xy') then applying factor or whatever to R2(f). I haven't tried it with your problem but that general idea has worked for me in similar situations. On Tue, Mar 25, 2008 at 5:18 AM, continuum121 <[EMAIL PROTECTED

[sage-support] polynomial object and symoblic computations

2008-03-25 Thread continuum121
Hi! I have a problem. Here is its formulation. I work in some polynomial ring - lets say R,(x,y) = PolynomialRing(QQ, 2, 'xy', order='lex').objgens() and consider ideal in R I = ideal(x+y^3-2,y+x^3-2) then I calculate grobner basis for ideal I B = I.groebner_basis(); B B[0] is univariate polynomi