8,986 reputation
1640
bio website
location
age
visits member for 2 years, 3 months
seen 18 hours ago

Nov
24
comment Creating a custom context with a Hold construct
@Leonid: I haven't seen the answer you mentioned, but I remembered that it was you who helped me to understand better the problem of symbols being created during parsing. I actually think that the inability to easily use the definition of the existing symbols in the calling context might in practice be the most important problem of this approach. This only leaves a relatively small area where it can be applied (and provides a real advantage)...
Nov
24
answered Creating a custom context with a Hold construct
Nov
22
comment NDSolve Plotting issue
@MMM: sorry that should be Export["path/to/file.txt",βOverS,"Table"] which will generate a tab-separated file. See the documentation for other possibilities...
Nov
22
comment NDSolve Plotting issue
@MMM: Export["path/to/file.txt",βOverS,"Text"]
Nov
22
revised NDSolve Plotting issue
corrected typo in equations and additional notes
Nov
22
revised NDSolve Plotting issue
added code to reproduce the second and third plot
Nov
22
comment importing large data files with a constraint
If I understand your problem correctly you can't avoid looking at all lines of the file. If your file is large and performance is a matter, I'd strongly suggest to read the file in chunks of appropriate size instead of line by line and then treat each chunk in memory. See e.g. my answer (here)[mathematica.stackexchange.com/a/15216/169] about how you can do that. If you don't mind the extra efforts Leonid's answer to the same question provides an even faster method to read files using Java, but you'd have to adopt the Java code for your problem...
Nov
21
comment NDSolve Plotting issue
@MMM: using βSolution you can get the β for a given set of s,m. Inserting that in fSolution you can get the solution for f for those s,m in the form of an InterpolatingFunction. With that you can get the derivative and evaluate at β. Doing that for a range of m-Values and a fixed s will give you one of the lines of the second plot. Similary you can get the second derivative at 0, generate a list of values and plot that. I don't have time to do this right now but maybe later or on the weekend...
Nov
21
revised NDSolve Plotting issue
minor editing of linebreaks and remove comment about ugly greek letters which now look nice
Nov
21
revised NDSolve Plotting issue
remove a superfluous ,
Nov
20
comment Timing Total crashes kernel
@m_goldberg and daniel: OK, I understand that my priorities are not shared by the majority :-)
Nov
20
revised NDSolve Plotting issue
added 107 characters in body
Nov
20
answered NDSolve Plotting issue
Nov
17
comment Timing Total crashes kernel
As ssch mentioned it doesn't seem to be related to the Timing at all, so you might want to change that in your question and title...
Nov
17
comment how to load packages on local computer when using remote kernels
@LiamWilliam: I agree that it isn't the best solution to use the complete $UserBaseDirectory as a repository, although I think it wouldn't do any harm. I also agree that the OP didn't mention to have concerns about using a repository hoster. I just wanted to make clear that rm-rf's suggestion not necessarily means that this is necessary (in case the OP or any reader would have concerns). Describing such a setup in detail is some work (and to a large extent is covered by the tools documentation) and depends on the OPs specific demands, that's probably why neither me nor anyone else did it...
Nov
17
answered Long run time for older code that ran fast in older versions
Nov
13
answered Caching data in Mathematica package
Nov
13
comment Table of Variables
I actually think that this is in a lot of cases the better solution: it is much easier to access these variables in a programmatic way and many functions as Solve, NDSolve,... do accept "nonatomic" variable names, so at least for them it isn't necessary to create those symbols programmatically...
Nov
13
comment Table of Variables
I admit I also use leading $ for variable names but I think it is important to reminde people that this has the danger to conflict with Module local variable names, especially when they end -- as in this case -- with digits...
Nov
4
comment How to use Compile to efficiently apply a function to every element of a list
it doesn't make a difference to the suggested solution, but I think it should be noted that f=#^2&;SetAttributes[f, Listable] does not achieve what you expect, the attributes of f don't influence how the pure function is evaluated. You woul instead want f=Function[Null,#^2,Listable]. Of course, as you mentioned, here it doesn't make a difference since Power is listable anyway. You can see the difference when using any function that isn't listable instead of Power...