2023-04-24 19:29:49 +0200 | received badge | ● Notable Question (source) |
2020-11-10 20:59:57 +0200 | received badge | ● Nice Question (source) |
2020-11-06 18:25:28 +0200 | received badge | ● Good Answer (source) |
2019-06-12 13:55:19 +0200 | received badge | ● Popular Question (source) |
2019-04-25 18:51:17 +0200 | received badge | ● Nice Answer (source) |
2019-03-14 17:37:47 +0200 | received badge | ● Good Question (source) |
2019-02-24 20:45:19 +0200 | received badge | ● Famous Question (source) |
2019-02-24 20:45:19 +0200 | received badge | ● Notable Question (source) |
2018-01-23 17:16:37 +0200 | received badge | ● Famous Question (source) |
2017-09-17 23:12:25 +0200 | received badge | ● Popular Question (source) |
2016-02-06 19:50:43 +0200 | received badge | ● Notable Question (source) |
2015-08-27 00:10:47 +0200 | received badge | ● Famous Question (source) |
2015-08-25 12:29:42 +0200 | received badge | ● Famous Question (source) |
2014-11-13 19:08:19 +0200 | received badge | ● Notable Question (source) |
2014-06-29 03:15:17 +0200 | marked best answer | Save 3d plot as vector format Is there a way to export a 3d plot as a pdf file? I know you can't do |
2014-06-29 03:15:16 +0200 | marked best answer | creating a group of similar functions with similar names 1 - create a list of function names (f0, f1, f2, ...) 2 - for each item in namelist 3 - take that that item and make it a function that raises x to a negative power equal to the position of that item (f0(x) = 1/x^0, f1(x) = 1/x^1, ...) Is this possible? EDIT: Made some progress by changing the type of namelist[i] to Expression by var(i)... |
2014-06-29 03:15:16 +0200 | marked best answer | plotting multiple functions from a for loop Here I link to a worksheet with which I'm having the darnedest trouble... The code in the worksheet makes it easy to plot many similar plots, and this is a pretty organized way to do it. I got it to work once, but I changed something and made too many changes afterward to get it working again to undo back to my original code. The problem is in the third cell, obviously. I want to assign to 'a' "plot all of the functions in the list funclist." I realize that they aren't functions, really (they aren't assigned names such as f0,f1,f2, etc), but I'll try to solve that another day. But anyway, how can I set this loop up to add all of these plots and dump them into an object? I need to be able to input 'a' and get a plot containing all of these. As is evident from the worksheet, I can't use the operator += (though I swear I did the first time). I would rather not to do it like this: Because that requires that I spread out the definition of 'a' and has an unnecessary amount of code. However, that seems to be the easiest way to do it. But I would like to be able to do it in two lines of code --- for i in plotlist, add all these plots to this object. Or three lines, if I have to initialize 'a' beforehand (give it a type or whatever.) |
2014-06-29 03:15:15 +0200 | marked best answer | use output of solve() without 'var == ' Is there a way to use the values of solve() without having that pesky 'var == ' in front of it? What the heck is that last line?! Is there a way to extract the value of sols[0] for use without needing to copy/paste the value? |
2014-04-09 07:24:36 +0200 | received badge | ● Popular Question (source) |
2014-01-04 21:28:19 +0200 | received badge | ● Nice Question (source) |
2013-12-11 16:05:34 +0200 | received badge | ● Popular Question (source) |
2013-12-05 08:52:13 +0200 | received badge | ● Notable Question (source) |
2013-11-22 07:38:56 +0200 | received badge | ● Famous Question (source) |
2013-09-22 13:42:55 +0200 | received badge | ● Popular Question (source) |
2013-09-13 16:51:25 +0200 | marked best answer | Save 3d plot as vector format The Sage 3D plots don't support output in a 2D vector format (like PDF), at least not for now. You can do it by calling matplotlib directly: PDF version of the image below |
2013-07-19 05:10:14 +0200 | received badge | ● Taxonomist |
2013-04-30 07:07:02 +0200 | received badge | ● Popular Question (source) |
2013-03-28 12:08:10 +0200 | received badge | ● Self-Learner (source) |
2013-03-28 12:08:10 +0200 | received badge | ● Teacher (source) |
2013-02-21 11:32:49 +0200 | received badge | ● Notable Question (source) |
2012-10-23 16:19:47 +0200 | asked a question | Map a function to each element of a matrix? Is there a direct way to apply a function to each entry of a matrix and return the resulting matrix? Not terribly hard, but it's not ideal. |
2012-10-22 17:26:34 +0200 | commented answer | How do I make functional substitutions? *Exactly* what I was looking for! Thanks! EDIT: Good question though. Why doesn't it work if you specify the variable of the function? |
2012-10-22 17:26:04 +0200 | marked best answer | How do I make functional substitutions? I think you want Here's the full code: I'm puzzled as to why it doesn't work if |
2012-10-22 16:16:35 +0200 | asked a question | How do I make functional substitutions? I want to substitute one function for another. Consider this: The very last line is what I'm trying to accomplish. I know it's the wrong command, but I'm wanting to make the substitution $v(x)\to\Gamma(x)$. Is there a way along these lines to do such a functional substitution? |
2012-10-14 14:19:07 +0200 | received badge | ● Popular Question (source) |
2012-09-30 11:59:14 +0200 | marked best answer | plotting multiple functions from a for loop I think you're going to be interested in list comprehensions and generator expressions. Using listcomps, your code compresses to: (Note that I changed the x lower limit to make it look better.) [BTW, as for your ability to use "a += something", that was almost certainly because you already had an "a" floating around from before.] If you want to one-line it: |