Ask Your Question

Zheng's profile - activity

2021-02-16 08:18:31 +0200 received badge  Famous Question (source)
2017-06-01 00:22:45 +0200 received badge  Famous Question (source)
2015-09-20 16:54:27 +0200 received badge  Notable Question (source)
2015-02-22 14:49:07 +0200 received badge  Popular Question (source)
2013-11-21 15:52:31 +0200 received badge  Notable Question (source)
2013-04-11 23:57:17 +0200 commented question Convert a sage.interfaces.matlab.MatlabElement object

It does not work and complains "NotImplementedError: Unable to parse output", by the way, I'm using sage-5.3

2013-04-08 14:51:14 +0200 commented question Hide source code on published worksheet

Try this http://sage.math.washington.edu/home/jason/sagecell/embedding.html and it can hide the code but it is not published on Sagenotebook.

2013-04-08 14:46:59 +0200 asked a question Convert a sage.interfaces.matlab.MatlabElement object

Hi,

I tried the following command to call Matlab to generate a sparse matrix and multiply it with a vector

sage: matlab('rand(3)')*matrix([1,2,2]).T
    0.0344    0.7655    0.4898
    0.4387    0.7952    0.4456
    0.3816    0.1869    0.6463

This is not correct. It seems the multiplication is not done. I'm curious if there is anyway to do the multiplication of a sage.interfaces.matlab.MatlabElement object and a built-in matrix object? Or is there anyway to convert a sage.interfaces.matlab.MatlabElement object to one that can do multiplications with the built-in matrix types? Thanks

2013-02-22 20:11:23 +0200 asked a question Hide source code on published worksheet

Displaying code for readers might be helpful but there are times when hiding them makes the published worksheet more readable, especially when you use sagenotebook for demonstration rather than for tutorials. For my case, I've used %hide in each cell to hide the cells and code(http://alpha.sagenb.org/home/pub/445/). However the published worksheet always displays the code which is undesirable. Is there anyway to surpress sagenotebook from displaying the cells that include sage commands?

2013-02-16 05:51:26 +0200 received badge  Popular Question (source)
2012-04-15 23:57:11 +0200 commented question what happens when save and quit a worksheet in sagenb?

Hi, I tried it and am sure it is not running. I later figured it out it's possibly that it is because sagenb.org becomes slow.

2012-04-03 21:35:51 +0200 asked a question what happens when save and quit a worksheet in sagenb?

I created a worksheet in www.sagenb.org. One cell takes much computing(ploting) and it stuck there. I saved and quit the worksheet. After coming back, the worksheet cannot compute 1+2=? in another cell. Is it because the original computing keeps working even when I quit?

2012-03-29 19:46:46 +0200 commented answer Interact 3d plot(Polyhedron)

Wow this is really magical. Thanks a lot!

2012-03-29 16:33:19 +0200 commented answer Interact 3d plot(Polyhedron)

Great! Thanks. in this way we should be able to animate a 3D plot. B.T.W. is it because Polyhedron only takes integer input that makes the function par(t) only takes integer inputs? An alternative way to animate the behavior of the Polyhedron is by using a loop and time.sleep(#). But it seems not work.

2012-03-29 16:29:00 +0200 received badge  Supporter (source)
2012-03-29 14:55:30 +0200 received badge  Student (source)
2012-03-29 02:24:34 +0200 received badge  Editor (source)
2012-03-29 02:23:22 +0200 asked a question Interact 3d plot(Polyhedron)

Hi there, I got confused about the interact:

def par(t):
    tmp = [[200-t,-1,0,0],[300-t,0,-1,0],[400-t,-1,-1,-1],[600-t,0,-1,-3],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
    G = Polyhedron(ieqs = tmp)
    show(G.render_solid(rgbcolor='blue',alpha=.2)+G.render_wireframe(rgbcolor='black'))

@interact
def _(x=(0,10)):
    par(x)

It is quite weird since in the examples of http://wiki.sagemath.org/interact/gra..., it seems that the interactive parameters could only be something controlling a plot. However in my case, the interactive parameter(x) is not used for controlling plot but for obtaining an [[],[]]. so it fails to interact. Any idea of that?