Reputation
28,990
Next tag badge:
86/100 score
34/20 answers
Badges
1 39 98
Impact
~278k people reached

Apr
3
comment Rewriting symbol context?
I do not get it. You had to type the long replacement rule of 50 replacements? So why not type one variable that is a list of all the symbols? Like this: paramList = {y -> 1, z -> 2} mySymbols = {x, y, z}; sol = f[mySymbols, paramList] You only have to type the list once and then use it. This is for me the clean solution, other than making a wrong API, then try to figure what hacks to do to fix things afterwords. But this is just how I would do it. If you wait more, may be you'll have better suggestions how to handle this. good luck.
Apr
3
comment What are the cool kids talking about when they use ##&[]?
@raxacoricofallapatorius you can also write If[# == 1, Sequence @@ {}, #] & /@ {1, 2, 3} which gives {2, 3} also. but from now on, I will use ##&[] to be more cool.
Apr
3
comment Rewriting symbol context?
fyi, updated my answer with your example of how I would do it to avoid the context mix problem.
Apr
3
comment Rewriting symbol context?
The example you showed shows exactly the problem I was talking about below. You can't mix symbols from different contexts. The way you are implementing this is not correct. The y and z in your example are in package context while the y and z you are passing are from global context. I suggest writing this as I showed below, otherwise, you'll have to do hacks and other such things to fix things. So better do things right from the start (my 2 cents ofcourse)
Apr
2
comment What are the cool kids talking about when they use ##&[]?
So the bottom line is that all these 3 do the same thing: Map[If[# == 1, Unevaluated@Sequence[], #] &, {1, 2, 3}]; If[# == 1, Unevaluated@Sequence[], #] & /@ {1, 2, 3}; If[# == 1, ## &[], #] & /@ {1, 2, 3}; so use the last one above. It is not only shorter than all the others, but also makes you look much smarter as well.
Apr
2
comment String-manipulation bugs in v10.1
I found, that WordCount, WordCounts, LetterCounts, CharacterCounts do nothing what do you mean by they do nothing? can you show examples? on my computer with 10.1 they don't do nothing, Example WordCount["word word word"] gives 3 and WordCounts["apple apple apple"] gives <|"apple" -> 3|> and LetterCounts["aaaaaaaaaa"] gives <|"a" -> 10|> Are you sure you have used these in version 10.1 and not 10.0.2?
Apr
2
comment Labels strangely rendered in PDF
would it not be easier to use epstopdf to convert eps to pdf than having to install Latex and compile a document just to do this conversion? There is also many free online sites that converts eps files to pdf. This is assuming the goal is just to convert eps to pdf.
Apr
2
comment Labels strangely rendered in PDF
what OS? versions?
Apr
2
comment PlotMarkers problem in ErrorListPlot, Mathematica 10
@Mr.Wizard fyi, the Joined->False is now fixed in 10.1, updated
Apr
2
comment Different results of a definite integral $\int_0^{\cosh ^{-1}(a)} \frac{1}{\sqrt{a^2 \text{sech}^2(x)-1}}\, dx$
@JunhoLee fyi, in 10.1 Integrate[1/Sqrt[-1 + 2^2*Sech[x]^2], {x, 0, ArcCosh[2]}] gives Pi/2, but with some message as well. Screen shot !Mathematica graphics
Apr
2
comment Mathematica integration failure - new or old?
fyi, it also crashed the kernel in 10.1 screen shot !Mathematica graphics windows 7, 64 bit
Apr
2
comment Copy/Paste of quoted text crashing Mathematica 10?
it does not crash on 10.1, but it hangs instead :)
Apr
2
comment Extraneous reaped data with NDSolve and WhenEvent
FYI, I do not see this extra value in 10.0.2 or in the new 10.1 (all on windows) !Mathematica graphics this looks like OSX only issue
Apr
2
comment Problem with DiscretizeRegion
I do not understand what is the bug here.
Apr
1
comment Building Butterworth Bandpass Filters
You can't do that. The way this is done, is to design the filter as low pass, then use frequency transformation to map it to bandpass. To design it as low pass and specify the order, you can't also specify the stop and pass corner frequencies and the order. One finds the order of the filter from the corner frequencies and the attenuation. If you want to specify the order, then you have to omit the stop corner frequency. Once you get the low pass filter, then the transformation is one line basically. The formulas are in the books. But you might want to ask in dsp group on this, I am no expert.
Apr
1
comment How to insert a Matrix into a larger matrix
where did the b's come from? b1,b2,....? did you mean d1,d2,....?
Apr
1
comment Building Butterworth Bandpass Filters
You can't specify the filter order N and both corner frequencies at the same time as requirement of the design. This is conflicting specification.
Mar
31
comment Poisson PDE in a rectangular domain
When the hole is also rectangular shape, then makes it easier, since the grid can be made to align there. with the rest of the region with no problem. So all what you have to do, is in the loop as you scan the region (updating the solution at each point), is simply check if you are inside the hole or not.
Mar
31
comment Poisson PDE in a rectangular domain
If there is a hole inside the section, then it is not rectangular section any more. FDM is hard to use when there is circular or any other shape boundaries since the meshing becomes hard to get correct (some points end up outside and some inside, etc..).That is why I think FEM would be easier for this. But you really need to describe the geometry better. What are the dimensions? What is the hole shape? etc..
Mar
31
comment Poisson PDE in a rectangular domain
if you want Poisson solver using FDM on rectangular cross section, there is a demo that implements this with many other solvers as well. demonstrations.wolfram.com/…