2019-04-21 07:20:34 -0500 | asked a question | Rounding, using modular arithmetic, etc. in find_fit? I'm learning how to use find_fit and it works great for polynomials, but I'd like to include expressions that require integers. My variables are all integers, and my coefficients are expected to be relatively simple rationals (i.e. small denominators). In particular, I'd like to use a model like: However, I get the expected error: If I try to convert (dx+ey+f) to an integer within the model using int(), ceiling(), etc. then it won't convert, since of course it's a symbolic expression. Is there a way to round within a symbolic expression? Or any suggestions for other workarounds? Thanks! edit: I was able to get it to run, but it doesn't provide an acceptable solution. I imagine it's due to how find_fit works with user-defined functions but I don't know enough about the inner-workings to work that out. Here is my code: and the output is I would like it to return, say, Is there a way to make this work a bit better for my needs? |

2015-12-06 06:21:56 -0500 | received badge | ● Student (source) |

2015-12-01 12:17:02 -0500 | commented answer | Can I scatter plot shaded grids? Thanks Karl-Dieter! I have the following spitting out black and white spaces. I've been trying to figure out how to use subdivisions to get horizontal and vertical lines to differentiate neighboring squares of the same color, but am coming up blank. Is there a way to get lines? Gridlines only puts the lines through the centers of each square. Edit: I think I have it. I added the following line: and included subdivisions=True in matrix_plot. |

2015-12-01 09:56:59 -0500 | asked a question | Can I scatter plot shaded grids? I would like to make a scatter plot, much like those in blog.zacharyabel.com/2012/06/putting-the-why-in-wythoff/ and blog.zacharyabel.com/2012/04/wythoffs-game-red-or-blue/ regarding Wythoff's Game. Right now my best approximation is using scatter_plot and gridlines='minor', but it's not quite what I'm looking for. Does anyone know if it's possible in Sage? |

2015-01-23 14:57:55 -0500 | received badge | ● Popular Question (source) |

2015-01-23 14:57:55 -0500 | received badge | ● Notable Question (source) |

2012-04-19 15:05:18 -0500 | marked best answer | Notebook hangs when run from command line I always start up my sage server by using the -c option to have Sage run a command. Here is my startup script: See step 8 of http://wiki.sagemath.org/SageServer |

2012-04-19 15:05:17 -0500 | received badge | ● Scholar (source) |

2012-04-18 13:25:48 -0500 | received badge | ● Supporter (source) |

2012-04-18 13:25:36 -0500 | received badge | ● Editor (source) |

2012-04-18 08:46:48 -0500 | answered a question | Notebook hangs when run from command line Thanks so much. That seems to work at first, it doesn't hang, but then I get no output from evaluating a cell. It just jumps to the next line with nothing to show for it. I've tried it in Chrome and Firefox. Could it be my parameters? I'm just trying to open it up to me as a user. edit: Playing with the settings I think I've sorted it out. I'm running /Applications/sage/sage -c "notebook(interface='',secure=True,accounts=False)" and it seems to work well. I'm not sure what caused the issue above, but it was clearly one of the settings. I appreciate the help. |

2012-04-18 04:46:46 -0500 | asked a question | Notebook hangs when run from command line I'm getting comfortable with Sage with my own work, and have tasked my students with registering at sagenb.org and working through some problems. I would like to run a Sage server from my desktop machine at home to access when I'm out, instead of trying to synchronize my worksheets. I'm running OS X 10.7 on a Mac Mini, and have properly forwarded the appropriate port. When I run sage in the Terminal, then the command notebook(interface='', server_pool=['sage1@localhost'], accounts=False, secure=True) things seem to work smoothly. I can access the login screen from a remote machine, run worksheets, and evaluate commands. However, when I try to run sage from the command line with ...sage --notebook interface='' server_pool=['sage1@localhost'] accounts=False secure=True I'm still able to access the login screen from a remote machine and run worksheets, but when I try to evaluate something it hangs. The command I'm using is something I put together from pieces I found on the Sage wiki, but I admit even after reading a number of tutorials over and over I'm still not sure what all the parameters mean. I'd like to run this server at boot, so I'm calling it via a bash script. If there's another way to do things I'm all ears. Does anyone have any suggestions? |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.