14,142 reputation
23467
bio website
location
age
visits member for 2 years, 6 months
seen 37 mins ago

1h
comment Is there a list of Octave functions mapped to the related Mathematica one?
@RunnyKine not baroque enough
1h
comment Is there a list of Octave functions mapped to the related Mathematica one?
The 3rd alternative for ones is a bit like this function for obtaining $2^n$: powerof2[n_] := Length@ReplaceRepeated[{0}, (0 -> Sequence[0, 0]), MaxIterations -> n] // Quiet
4h
comment Is there a list of Octave functions mapped to the related Mathematica one?
I understand; like I said, you might have better luck looking for matlab-mathematica tables. Also, a more direct translation of ones(n) probably would be ConstantArray[1, n]. However, that creates a list (or vector) of Integer entries, which means that if you try to do any arithmetic with it it will be done with exact numbers. This is much slower than with reals. This sort of booby traps are everywhere in mma.
5h
comment Is there a list of Octave functions mapped to the related Mathematica one?
You might look for matlab-mathematica functions. But keep in mind that, as a language, mathematica is very different from matlab or octave.
5h
comment Why does WRI not provide symbolic solution(s) to Heat equation?
@chris Yes that would be useful. Just like you can use mma now rather than carry around Gradshteyn-Ryzhik or Abramowitz-Stegun. Great idea.
6h
comment Why does WRI not provide symbolic solution(s) to Heat equation?
Maybe because it's more of a mathematical problem than a Mathematica problem. I'm not sure how I'd go about finding analytical solutions with mma (but maybe someone else knows).
6h
comment Get the last line from from each of a large number of files, transform them, and write all results to a single new file
You can even make a palette! (OK I guess it won't work with hundreds of files, but self-promotion is self-promotion)
6h
comment Why does WRI not provide symbolic solution(s) to Heat equation?
While I didn't vote to close it, I suppose the reason is that you're asking why WRI does not provide functionality X. It's not something people are likely to be able to answer here. Having said that, maybe the reason they don't provide Green's function solutions is that those are convolutions and the kernel depends on the geometry, for example (eg consider the solution of the 1d heat equation in $[-1,1]$). I don't really know though.
17h
comment How can I prevent a compiled function from using uncompiled evaluation?
@JasonB OK, if you only ever run it headless then you won't see it. For what it's worth, what I do is write code on my laptop, make sure it works on small example, then send the whole thing to bigger machines. But if you can't, then the solutions here might be the only way (I do have it in my init.m as you said).
18h
comment How can I prevent a compiled function from using uncompiled evaluation?
@JasonB Are you aware of SetSystemOptions["CompileOptions" -> "CompileReportExternal"->True]? If not, it might be useful in your case (it warns you at compile time if you reference an external variable). I might have misunderstood the problem you are trying to solve, though.
18h
reviewed Leave Open Mathematica policy for correctness of results
18h
comment Taking inverse powers of an expression to that power
I see. Well then, the existence of branch cuts is why $(x^3)^{1/3}\neq x$, which is why Mathematica does not simplify your expression.
19h
comment Taking inverse powers of an expression to that power
(or Im instead of Arg, etc). Basically you need to find out what a branch cut is.
19h
comment Taking inverse powers of an expression to that power
You can see why it doesn't from this: Plot3D[ Arg[((x + I*y)^3)^(1/3)], {x, -2, 2}, {y, -2, 2} ]
21h
comment How can I prevent a compiled function from using uncompiled evaluation?
OK, I thought you were worried about passing the wrong argument, not actually forgetting to localise your variables.
21h
comment How can I prevent a compiled function from using uncompiled evaluation?
you can also do fc = Compile[{{z, _Real}}, Sin[z]]; f[x_?NumericQ] := fc[x]
1d
comment Map 2 list to a function
You can do Outer[{#1, CountryData[#1, #2]} &, listCountries, data] for the second bit. Outer is very flexible and well worth understanding.
1d
comment Map 2 list to a function
@Öskå hey, thanks!
1d
revised Map 2 list to a function
switched order of solutions
1d
answered Map 2 list to a function