Reputation
15,328
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
2 40 74
Newest
 Nice Answer
Impact
~219k people reached

Jun
5
comment NDSolve break condition
@Ian excellent, up voted. Happy to serve as a guinea pig.
Apr
27
comment Finding adjacency matrix of a Mathematica's in-built graph?
Dodecahedral is a symbol, not a graph. You want this: d = GraphData["DodecahedralGraph"]; AdjacencyMatrix[d], I think.
Feb
28
comment How to define a function
something like f[u_[x_]] := x, but defining a function that takes as a second argument the derivative of the first is more involved.
Jan
31
comment Does Mathematica support Laguerre Polynomials of Matrix Argument?
So operationally, you can think of MatrixFunction as taking a scalar function as the first arg, finding its series expansion, then using that to turn it into a matrix function and finally applying that to the second arg. If the second arg can eg be diagonalised via an orthogonal transformation, all you'd need to do do the transformation, apply a polynomial to the eigenvals and undo the transformation.
Jan
31
comment Does Mathematica support Laguerre Polynomials of Matrix Argument?
Oops you're right, LaguerreL is Listable so it just threads. OK, this does what you want I think: m = # + Transpose@# &@RandomReal[{-1, 1}, {10, 10}]; MatrixFunction[LaguerreL[3.2, #] &, m] (the idea is that MatrixFunction takes a scalar fn as the first arg, turns it into a matrix function and applies it to the second argument). Unless you actually do want a scalar as the output but then you need to explain how you want to get it.
Jan
30
comment Does Mathematica support Laguerre Polynomials of Matrix Argument?
it produces a 10 by 10 matrix of elements drawn from a uniform random distribution and then adds it to its transpose. I just wanted a symmetric matrix.
Jan
30
comment Does Mathematica support Laguerre Polynomials of Matrix Argument?
Apparently yes, eg m = # + Transpose@# &@RandomReal[{-1, 1}, {10, 10}]; LaguerreL[3.2, m] seems to work. In general you could also use MatrixFunction for this sort of thing.
Jan
20
comment Why is (-1.)^2. a complex number
@xslittlegrass I see. No idea then.
Jan
20
comment Why is (-1.)^2. a complex number
Look: Plot[{Re@#, Im@#} &@((-1)^x), {x, 1.5, 2.5}]
Dec
16
comment Can't type in notebook in version 10
The same thing happened to me a couple of times (also on OS X). Quitting Mathematica and restarting it fixed it both times. Interestingly, when I quit, it put up a dialog to save a few of the notebooks, and there I could interact with it (to click on yes or no). Very strange.
Aug
29
comment Integral of x^p
Oh right that's why it doesn't work in mathematica. Oops, pattern recognised the wrong thing, I'm an idiot sorry.
Aug
29
comment Integral of x^p
Actually the log is recovered in the limit. It's just that mathematica doesn't recover it correctly.
Aug
29
comment Integral of x^p
Well, $\lim_{p\rightarrow -1} \frac{x^{p+1}}{p+1}=\ln(x)$. Not that mathematica knows this, though (try Limit[x^(1 + p)/(1 + p), p -> -1])
Aug
27
comment Numerical error in Mathieu functions
Mathematica doesn't like Mathieu functions
Aug
23
comment ToExpression from commandline
I think it is a bug, in the sense that eg Plot[Sin[x],{x,-5,5}] doesn't cause mma to hang. So, while I agree that the fact that it fails is not a bug, that it hangs seems to be. Or am I missing something?
Aug
22
comment Importing multiple images for machine learning classification
something like Import[#] & /@ FileNames["folder/*.jpg"] is what you want. Mathematica has about 3 gigabytes of documentation.
Aug
15
comment Finding average error of the data
@Mike a) that code doesn't work unless I know temp, b) is it too much to ask what doesn't work with LinearModelFit or the NonlinearModelFit example I gave?
Aug
15
comment Finding average error of the data
If, for example, dat = Table[{x, Sin[x] + RandomReal[{-.2, .2}]}, {x, 0, 10, .1}]; (because the code you gave needs a location and other parameters and I don't know, nor want to learn, how to set that) then eg mdl = NonlinearModelFit[dat, a*Sin[b*x] + c, {a, b, c}, x] finds a model and you can find for example the variance like so Variance[dat[[All, 2]] - mdl /@ dat[[All, 1]]].
Aug
15
comment Efficient Langevin Equation Solver
@chris I don't know to be honest. Why not write to him?
Aug
14
comment Test a wooden board's vibration mode
@Mr.Wizard OK, as you can see I did not vote for it to be closed. Maybe you're right.