Reputation
12,043
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
1 27 87
Impact
~184k people reached

Mar
20
comment Using TimeSeriesForecast for forecasting the traffic growth
Is your problem in getting the data from the Google spreadsheet into Mathematica, or is your problem in the use of TimeSeriesForecast on the imported data?
Mar
20
comment Length of Union Incorrect?
@Jinxed: I guess it wasn't done for that reason here (see at the end of the comment), but Do[expression,{1}] at top level is a reliable way to prevent the value of the expression not only from output, but also from being stored in Out (if you just put a semicolon at the end, it doesn't get printed, but still gets stored in Out). Just writing Do[expression] (without the {1}) also works, but has the disadvantage that the syntax highlighter tells you there is a second argument missing. However assigning the resulting Null to ConnectingList doesn't seem meaningful.
Mar
19
comment Piecewise function output response interpretation
The function returns 0 if neither t >= 0 nor t <= 0. For example, if you define strange /: strange >= 0 = False; strange /: strange <= 0 = False you get a strange value which is neither >=0 nor <= 0. Consequently, if you evaluate your piecewise function with t=strange, you'll get 0 as result.
Mar
19
comment Why does this expression take a long time to evaluate?
Mathematica recognizes unsolvable problems (although that may also take time; also I think detecting all unsolvable problems is not possible in principle), but how is Mathematica supposed to know what you consider an unreasonable time? I might be interested enough in a solution that I'm willing to wait a week to get it. Note that you can tell Mathematica to stop after a certain time using TimeConstrained.
Mar
18
comment Printing names of indexed variables instead of values
Also With[{i=1},HoldForm[foo[i]]] works. As does i=1;With[{i=i},HoldForm[foo[i]]].
Mar
18
comment Strange behavior of Limit in Mathematica 9 and 10 (bug?)
Actually I'm surprised that it works at all, since strictly speaking the limit doesn't exist (you usually use a notation like $\lim_{\eta\to 0^+}$ to indicate the extra condition that you are calculating a one-sided limit). However I don't know under which conditions Mathematica considers a limit to be one-sided.
Mar
15
comment How to find Multiple Maxima/Minima
FindMaximum allows you to give a starting point for the search; if you have a rough idea where to find the maxima, you could try using that. If your function is analytic, you might also calculate the derivative and solve for places where it is zero (don't forget to look at the second derivative to distinguish maxima/minima from saddle points).
Feb
18
comment Can Mathematica's random number generation be improved?
@JEP: The headers random and chrono were added to C++ in the C++11 standard. It might be that your C++ compiler doesn't support C++11, or that you have to give a special flag to compile C++11 code.
Oct
29
comment High-Precision NSolve
Does NSolve[SetPrecision[f1[x]==f2[x], 100], x, WorkingPrecision->100] work? (On 8.0.0.0, your version gives no warning and a result of {{}}, so I can't check myself).
Oct
28
comment Is this an error/bug with Plot Command?
@ChipHurst: Both seem not to be available at Mathematica 8; however I've found them in the web documentation. CubeRoot clearly wouldn't be a replacement for realpower, covering only the very special case $x^{1/3}$. Surd (which IMHO is a contender for the most unintuitively named Mathematica function) gives the more general case $x^{1/n}$; while it would certainly be a better building block for realpower, it's however not a full replacement because it doesn't handle e.g. $x^{2/3}$ (which is the case from the question).
Oct
23
comment Can't figure out how to apply these functions repeatedly
@Guest: OK, I think now it does what you meant.
Oct
23
comment Can't figure out how to apply these functions repeatedly
Ah, OK, I misunderstood that. I'll change the code accordingly.
Oct
23
comment Is this an error/bug with Plot Command?
@Anoldmaninthesea.: In complex numbers, $x^{1/3}$ is indeed not the inverse of $x^3$. For example, $((-1)^3)^{1/3}\ne -1$. Actually, for even exponents, the same is already true in the real numbers, where $((-1)^2)^{1/2} = 1 \ne -1$. Only for positive $x$ the two functions are inverse to each other.
Oct
23
comment Is this an error/bug with Plot Command?
@Anoldmaninthesea.: Actually, it is not the representation, but the definition of the complex power. It's just easiest described in the polar representation (most probably, internally the formula $x^y=\exp(y\ln x)$ is used, together with an appropriate branch cut for $\ln x$). However see my edit for a function that does what you want (but probably has a lot of room for improvement).
Oct
18
comment C compiler options passed by Mathematica
Did you try them separately?
Oct
18
comment C compiler options passed by Mathematica
Does it work if you prefix the space in "Program Files" with a single backslash? Or maybe use "CompilerInstallation" -> "\"C:...bin\""?
Oct
18
comment Plotting on the Raspberry Pi
Yes, I noticed that. Given that it came with the RPi for free, it didn't strike me as odd. Especially since you normally can do everything also with the kernel interface, just less comfortably.
Oct
18
comment Plotting on the Raspberry Pi
Ah, thank you, I didn't notice that. After I've seen the "Wolfram" Icon, I didn't think of searching for another icon ;-) I now found the notebook interface, and there plotting indeed works fine.
Oct
16
comment How to Use Mathematica as a C/C++ compiler
Of course Mathematica can be used as C compiler. You just first have to write the Mathematica code that compiles C programs. ;-)
Oct
15
comment How to trigger UNIX command-line command from Mathematica notebook?
@DavidZ: Thank you for that information. I just checked with Run["false"] and I indeed got 256 instead of 1, providing further evidence for this hypothesis.