5.52 Tuesday, January 5, 2016

================================== 
Top new questions this week: 
==================================

[Optional throws error when called from a package. Workaround?] http://mathematica.stackexchange.com/questions/103084/optional-throws-error-when-called-from-a-package-workaround

Bug introduced in 8.0 or earlier and persisting through 10.3 or later.

Case number: 305932.

In the front-end notebook (Mathematica 9.0 and 10.2):

g[x: Optional[_,default]]:=x;

has no problems, ...

- asked by QuantumDot (10 votes), answered by jkuczm (11 votes)

—————————-

[How to automatically have ContourLabels in middle of Contour lines if specific levels are not specified?] http://mathematica.stackexchange.com/questions/103289/how-to-automatically-have-contourlabels-in-middle-of-contour-lines-if-specific-l

I looked at all the questions/answers relating to placement of ContourLabels but could not find an answer to this. Some of the answers before are based on user giving before-hand, the Contours levels ...

- asked by Nasser (8 votes), answered by Jens (10 votes)

—————————-

[Generating assignments and transforming code inside Holding forms when generating code] http://mathematica.stackexchange.com/questions/103263/generating-assignments-and-transforming-code-inside-holding-forms-when-generatin

I have been playing with slightly above trivial code manipulations in Mathematica. I thought Mathematica would be great for this kind of work because of rule replacement and expression manipulation, ...

- asked by Manuel Odendahl (7 votes), answered by Leonid Shifrin (9 votes)

—————————-

[Overlay vs Show for plots?] http://mathematica.stackexchange.com/questions/103073/overlay-vs-show-for-plots

I am trying to understand the differences of Overlay and Show to combine two plots. A typical use case is to superpose a ListPlot of some data with a Plot of a curve to fit the data.

The following ...

- asked by becko (7 votes), answered by eldo (13 votes)

—————————-

[What should I learn from DSolve working better with a named constant than a number in this case?] http://mathematica.stackexchange.com/questions/103327/what-should-i-learn-from-dsolve-working-better-with-a-named-constant-than-a-numb

I have an equation \[\bigl (r''(\phi )r(\phi ) - r'(\phi )^2\bigr )\bigl (b + r(\phi )\bigr ) = r(\phi )\bigl (r'(\phi )^2 + r(\phi )^2\bigr )\] Here \(b\) and \(r\) are lengths, and \(\phi \) is an angle (in radians, so ...

- asked by David Z (7 votes), answered by bbgodfrey (2 votes)

—————————-

[W|A or Mathematica for CountryData?] http://mathematica.stackexchange.com/questions/103302/wa-or-mathematica-for-countrydata

Sometimes W|A gives you something ...

WolframAlpha["electricity production of the United States in 2007", "Result"] 
 
... not available in the WDF 
 
 
CountryData["UnitedStates",  ...

- asked by Ronald Monson (7 votes), answered by Paco Jain (3 votes)

—————————-

[How to implement JoinTo efficiently?] http://mathematica.stackexchange.com/questions/103238/how-to-implement-jointo-efficiently

AppendTo is not efficient so I’m not quite sure of the best way to implement its analogue for joining (e.g. in python this would be extend function). So how can this be improved:

ClearAll[JoinTo]; ...

- asked by M.R. (7 votes), answered by eldo (0 votes)

================================== Greatest hits from previous weeks: ==================================

[Find eigen energies of time-independent Schrodinger equation] http://mathematica.stackexchange.com/questions/32293/find-eigen-energies-of-time-independent-schrodinger-equation

I’m trying to get the eigenvalues of a one dimensional time-independent Schrodinger equation,

\(-\frac {h^2}{2m_0}\frac {d^2\psi }{dx^2}+U(x)~\psi =Ei~\psi \)

where U(x) is some potential and Ei is the ...

- asked by xslittlegrass (33 votes), answered by Jens (36 votes)

—————————-

[How to create word clouds?] http://mathematica.stackexchange.com/questions/2334/how-to-create-word-clouds

Word clouds are rather useless fancy and visually appealing plots, where words are plotted with different sizes according to their frequency in a corpus. Many applications exist out there (Wordle, ...

- asked by Istvan Zachar (124 votes), answered by Heike (105 votes)

================================== Can you answer these? ==================================

[How can I import from a usb webcam on the raspberry pi?] http://mathematica.stackexchange.com/questions/103364/how-can-i-import-from-a-usb-webcam-on-the-raspberry-pi

I’m trying to set up a raspberry pi as a webcam server and I need to import images into a mathematica notebook on the raspberry pi. I tried using CurrentImage[] just to test it but I got an error just ...

- asked by Tobias Nash (2 votes)

—————————-

[How to change default font for all existing notebooks at once?] http://mathematica.stackexchange.com/questions/103053/how-to-change-default-font-for-all-existing-notebooks-at-once

By default, Mathematica 9 and 10 use Gill Sans MT fonts for headings of title/subtitle/section/subsection/subsubsection. Unfortunately, Gill Sans MT fonts have no Cyrillic letters, so that all ...

- asked by Igor Kotelnikov (5 votes)

—————————-

[VERY slow to solve a nonlinear equation involving matrix eigenvalues] http://mathematica.stackexchange.com/questions/103282/very-slow-to-solve-a-nonlinear-equation-involving-matrix-eigenvalues

I am trying to solve a problem similar to the following:

f[k_, a_] := ( 
Matrix = {{0.05, (a*k)^2}, {(a*k)^2, -0.05}}; 
 
{eps, psi} = Eigensystem[Matrix]; 
 
{eps,psi} = {eps[[#]], psi[[#]]} &@ 
  ...

- asked by Xiao (2 votes)