- home
- PDF (letter size)
- PDF (legal size)

January 7, 2017 compiled on — Saturday January 07, 2017 at 03:05 AM [public]

1 Tuesday, January 3, 2017

2 Tuesday, December 27, 2016

3 Tuesday, December 20, 2016

4 Tuesday, December 13, 2016

5 Tuesday, December 6, 2016

6 Tuesday, November 29, 2016

7 Tuesday, November 22, 2016

8 Tuesday, November 15, 2016

9 Tuesday, November 8, 2016

10 Tuesday, November 1, 2016

11 Tuesday, October 25, 2016

12 Tuesday, October 18, 2016

13 Tuesday, October 11, 2016

14 Tuesday, October 4, 2016

15 Tuesday, September 27, 2016

16 Tuesday, September 20, 2016

17 Tuesday, September 13, 2016

18 Tuesday, September 6, 2016

19 Tuesday, August 30, 2016

20 Tuesday, August 23, 2016

21 Tuesday, August 16, 2016

22 Tuesday, August 9, 2016

23 Tuesday, August 2, 2016

24 Tuesday, July 26, 2016

25 Tuesday, July 19, 2016

26 Tuesday, July 12, 2016

27 Tuesday, July 5, 2016

28 Tuesday, June 28, 2016

29 Tuesday, June 21, 2016

30 Tuesday, June 14, 2016

31 Tuesday, June 7, 2016

32 Tuesday, May 31, 2016

33 Tuesday, May 24, 2016

34 Tuesday, May 17, 2016

35 Tuesday, May 10, 2016

36 Tuesday, May 3, 2016

37 Tuesday, April 26, 2016

38 Tuesday, April 19, 2016

39 Tuesday, April 12, 2016

40 Tuesday, April 5, 2016

41 Tuesday, March 29, 2016

42 Tuesday, March 22, 2016

43 Tuesday, March 15, 2016

44 Tuesday, March 8, 2016

45 Tuesday, March 1, 2016

46 Tuesday, February 23, 2016

47 Tuesday, February 16, 2016

48 Tuesday, February 9, 2016

49 Tuesday, February 2, 2016

50 Tuesday, January 26, 2016

51 Tuesday, January 19, 2016

52 Tuesday, January 12, 2016

53 Tuesday, January 5, 2016

54 Tuesday, December 29, 2015

55 Tuesday, December 22, 2015

56 Tuesday, December 15, 2015

57 Tuesday, December 8, 2015

58 Tuesday, December 1, 2015

59 Tuesday, November 24, 2015

60 Tuesday, November 17, 2015

61 Tuesday, November 10, 2015

62 Tuesday, November 3, 2015

63 Tuesday, October 27, 2015

64 Tuesday, October 20, 2015

65 Tuesday, October 13, 2015

66 Tuesday, October 6, 2015

67 Tuesday, September 29, 2015

68 Tuesday, September 22, 2015

69 Tuesday, September 15, 2015

70 Tuesday, September 8, 2015

71 Tuesday, September 1, 2015

72 Tuesday, August 25, 2015

73 Tuesday, August 18, 2015

74 Tuesday, August 11, 2015

75 Tuesday, August 4, 2015

76 Tuesday, July 28, 2015

77 Tuesday, July 21, 2015

78 Tuesday, July 14, 2015

79 Tuesday, July 7, 2015

80 Tuesday, June 30, 2015

81 Tuesday, June 23, 2015

82 Tuesday, June 16, 2015

83 Tuesday, June 9, 2015

84 Tuesday, June 2, 2015

85 Tuesday, May 26, 2015

86 Tuesday, May 19, 2015

87 Tuesday, May 12, 2015

88 Tuesday, May 5, 2015

89 Tuesday, April 28, 2015

90 Tuesday, April 21, 2015

91 Tuesday, April 14, 2015

92 Tuesday, April 7, 2015

93 Tuesday, March 31, 2015

94 Tuesday, March 24, 2015

95 Tuesday, March 17, 2015

96 Tuesday, March 10, 2015

97 Tuesday, March 3, 2015

98 Tuesday, February 17, 2015

99 Tuesday, February 17, 2015

100 Tuesday, February 10, 2015

101 Tuesday, February 3, 2015

102 Tuesday, January 27, 2015

103 Tuesday, January 20, 2015

104 Tuesday, January 13, 2015

105 Tuesday, January 6, 2015

106 Tuesday, December 30, 2014

107 Tuesday, December 16, 2014

108 Tuesday, December 16, 2014

109 Tuesday, December 9, 2014

110 Tuesday, December 2, 2014

111 Tuesday, November 25, 2014

112 Tuesday, November 18, 2014

113 Tuesday, November 11, 2014

114 Tuesday, November 4, 2014

115 Tuesday, October 28, 2014

116 Tuesday, October 21, 2014

117 Tuesday, October 14, 2014

118 Tuesday, October 7, 2014

119 Tuesday, September 30, 2014

120 Tuesday, September 23, 2014

121 Tuesday, September 16, 2014

122 Tuesday, September 9, 2014

123 September 2, 2014

124 August 26, 2014

125 August 19, 2014

126 August 12, 2014

127 August 5, 2014

128 July 29, 2014

129 July 22, 2014

130 July 15, 2014

131 July 8,2014

132 July 1, 2014

133 June 24, 2014

134 June 17, 2014

135 June 10, 2014

136 June 3, 2014

137 May 27 2014

138 May 20 2014

139 May 13, 2014

140 May 6, 2014

141 April 15, 2014

142 April 1, 2014

143 March 25, 2014

144 March 18, 2014

145 March 11, 2014

146 March 4, 2014

147 February 25, 2014

148 February 18, 2014

149 February 11, 2014

150 February 4, 2014

151 January 28, 2014

152 January 21, 2014

153 January 14, 2014

154 January 7, 2014

155 December 31, 2013

156 December 24, 2013

157 December 17, 2014

158 December 10, 2013

159 December 3, 2013

160 November 26, 2013

161 November 19, 2013

162 November 12, 2013

163 November 5, 2013

164 October 29, 2013

165 October 22, 2013

166 October 15, 2013

167 October 1, 2013

168 September 24, 2013

169 September 17, 2013

170 September 10, 2013

171 September 3, 2013

172 August 27, 2013

173 August 20, 2013

174 April 29, 2013

175 April 22, 2013

176 April 8, 2013

2 Tuesday, December 27, 2016

3 Tuesday, December 20, 2016

4 Tuesday, December 13, 2016

5 Tuesday, December 6, 2016

6 Tuesday, November 29, 2016

7 Tuesday, November 22, 2016

8 Tuesday, November 15, 2016

9 Tuesday, November 8, 2016

10 Tuesday, November 1, 2016

11 Tuesday, October 25, 2016

12 Tuesday, October 18, 2016

13 Tuesday, October 11, 2016

14 Tuesday, October 4, 2016

15 Tuesday, September 27, 2016

16 Tuesday, September 20, 2016

17 Tuesday, September 13, 2016

18 Tuesday, September 6, 2016

19 Tuesday, August 30, 2016

20 Tuesday, August 23, 2016

21 Tuesday, August 16, 2016

22 Tuesday, August 9, 2016

23 Tuesday, August 2, 2016

24 Tuesday, July 26, 2016

25 Tuesday, July 19, 2016

26 Tuesday, July 12, 2016

27 Tuesday, July 5, 2016

28 Tuesday, June 28, 2016

29 Tuesday, June 21, 2016

30 Tuesday, June 14, 2016

31 Tuesday, June 7, 2016

32 Tuesday, May 31, 2016

33 Tuesday, May 24, 2016

34 Tuesday, May 17, 2016

35 Tuesday, May 10, 2016

36 Tuesday, May 3, 2016

37 Tuesday, April 26, 2016

38 Tuesday, April 19, 2016

39 Tuesday, April 12, 2016

40 Tuesday, April 5, 2016

41 Tuesday, March 29, 2016

42 Tuesday, March 22, 2016

43 Tuesday, March 15, 2016

44 Tuesday, March 8, 2016

45 Tuesday, March 1, 2016

46 Tuesday, February 23, 2016

47 Tuesday, February 16, 2016

48 Tuesday, February 9, 2016

49 Tuesday, February 2, 2016

50 Tuesday, January 26, 2016

51 Tuesday, January 19, 2016

52 Tuesday, January 12, 2016

53 Tuesday, January 5, 2016

54 Tuesday, December 29, 2015

55 Tuesday, December 22, 2015

56 Tuesday, December 15, 2015

57 Tuesday, December 8, 2015

58 Tuesday, December 1, 2015

59 Tuesday, November 24, 2015

60 Tuesday, November 17, 2015

61 Tuesday, November 10, 2015

62 Tuesday, November 3, 2015

63 Tuesday, October 27, 2015

64 Tuesday, October 20, 2015

65 Tuesday, October 13, 2015

66 Tuesday, October 6, 2015

67 Tuesday, September 29, 2015

68 Tuesday, September 22, 2015

69 Tuesday, September 15, 2015

70 Tuesday, September 8, 2015

71 Tuesday, September 1, 2015

72 Tuesday, August 25, 2015

73 Tuesday, August 18, 2015

74 Tuesday, August 11, 2015

75 Tuesday, August 4, 2015

76 Tuesday, July 28, 2015

77 Tuesday, July 21, 2015

78 Tuesday, July 14, 2015

79 Tuesday, July 7, 2015

80 Tuesday, June 30, 2015

81 Tuesday, June 23, 2015

82 Tuesday, June 16, 2015

83 Tuesday, June 9, 2015

84 Tuesday, June 2, 2015

85 Tuesday, May 26, 2015

86 Tuesday, May 19, 2015

87 Tuesday, May 12, 2015

88 Tuesday, May 5, 2015

89 Tuesday, April 28, 2015

90 Tuesday, April 21, 2015

91 Tuesday, April 14, 2015

92 Tuesday, April 7, 2015

93 Tuesday, March 31, 2015

94 Tuesday, March 24, 2015

95 Tuesday, March 17, 2015

96 Tuesday, March 10, 2015

97 Tuesday, March 3, 2015

98 Tuesday, February 17, 2015

99 Tuesday, February 17, 2015

100 Tuesday, February 10, 2015

101 Tuesday, February 3, 2015

102 Tuesday, January 27, 2015

103 Tuesday, January 20, 2015

104 Tuesday, January 13, 2015

105 Tuesday, January 6, 2015

106 Tuesday, December 30, 2014

107 Tuesday, December 16, 2014

108 Tuesday, December 16, 2014

109 Tuesday, December 9, 2014

110 Tuesday, December 2, 2014

111 Tuesday, November 25, 2014

112 Tuesday, November 18, 2014

113 Tuesday, November 11, 2014

114 Tuesday, November 4, 2014

115 Tuesday, October 28, 2014

116 Tuesday, October 21, 2014

117 Tuesday, October 14, 2014

118 Tuesday, October 7, 2014

119 Tuesday, September 30, 2014

120 Tuesday, September 23, 2014

121 Tuesday, September 16, 2014

122 Tuesday, September 9, 2014

123 September 2, 2014

124 August 26, 2014

125 August 19, 2014

126 August 12, 2014

127 August 5, 2014

128 July 29, 2014

129 July 22, 2014

130 July 15, 2014

131 July 8,2014

132 July 1, 2014

133 June 24, 2014

134 June 17, 2014

135 June 10, 2014

136 June 3, 2014

137 May 27 2014

138 May 20 2014

139 May 13, 2014

140 May 6, 2014

141 April 15, 2014

142 April 1, 2014

143 March 25, 2014

144 March 18, 2014

145 March 11, 2014

146 March 4, 2014

147 February 25, 2014

148 February 18, 2014

149 February 11, 2014

150 February 4, 2014

151 January 28, 2014

152 January 21, 2014

153 January 14, 2014

154 January 7, 2014

155 December 31, 2013

156 December 24, 2013

157 December 17, 2014

158 December 10, 2013

159 December 3, 2013

160 November 26, 2013

161 November 19, 2013

162 November 12, 2013

163 November 5, 2013

164 October 29, 2013

165 October 22, 2013

166 October 15, 2013

167 October 1, 2013

168 September 24, 2013

169 September 17, 2013

170 September 10, 2013

171 September 3, 2013

172 August 27, 2013

173 August 20, 2013

174 April 29, 2013

175 April 22, 2013

176 April 8, 2013

[Why should I avoid the For loop in Mathematica?] http://mathematica.stackexchange.com/questions/134609/why-should-i-avoid-the-for-loop-in-mathematica

Some people advise against the use of For loops in Mathematica. Why? Should I heed this advice? What is wrong with For? What should I use instead?

- asked by Szabolcs (27 votes), answered by Szabolcs (36 votes)

—————————-

[Is there a style sheet that can be used to generate Stack Exchange input?] http://mathematica.stackexchange.com/questions/134518/is-there-a-style-sheet-that-can-be-used-to-generate-stack-exchange-input

It would be convenient if there were a style sheet that automatically indented input cells, and automatically commented output cells, so that one could generate a stack exchange response in WL, and ...

- asked by Carl Woll (24 votes), answered by Carl Woll (21 votes)

—————————-

[Function to create a path made of horizontal and vertical lines between a number of points] http://mathematica.stackexchange.com/questions/134424/function-to-create-a-path-made-of-horizontal-and-vertical-lines-between-a-number

I would like to create a function where I can define which case I want to use to create a path.

p1 = {40, 48}; p2 = {50, 116}; p3 = {63, 160};

listPurple = Symbol["p" <> ToString[#]] & /@ ...

listPurple = Symbol["p" <> ToString[#]] & /@ ...

- asked by Maria Regina (16 votes), answered by corey979 (15 votes)

—————————-

[How to wrap a crumpled paper over a surface?] http://mathematica.stackexchange.com/questions/134514/how-to-wrap-a-crumpled-paper-over-a-surface

My initial question was about the making of a crumpled paper. After reading this article suggested by J.M. and little more browsing (kind of random walk you do on a Saturday) I thought about expanding ...

- asked by Sumit (8 votes)

—————————-

[Would like input and output printed on same line, w/o needing extra syntax] http://mathematica.stackexchange.com/questions/134406/would-like-input-and-output-printed-on-same-line-w-o-needing-extra-syntax

SUMMARY

I'd like to get MMA to automatically print both input and output on the same line, in TraditionalForm, without having to add any extra syntax. Further, I'd like the output to be fully ...

- asked by theorist (8 votes), answered by Simon Rochester (4 votes)

—————————-

[Issue with Cell Frames in version 11] http://mathematica.stackexchange.com/questions/134665/issue-with-cell-frames-in-version-11

Since upgrading to version 11, all of my notebooks now have cell frames are either missing the top or bottom part. Is anyone else experiencing this? Is there a way to fix this? Is this considered ...

- asked by Michael McCain (7 votes), answered by MB1965 (5 votes)

—————————-

[How to speed up this code about a triple integral?] http://mathematica.stackexchange.com/questions/134477/how-to-speed-up-this-code-about-a-triple-integral

How to speed up this code? It's unbelievably slow!!! My solution with pen and paper is faster.

- asked by Mika Ike (7 votes), answered by corey979 (10 votes)

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

[Exporting graphics to PDF - huge file] http://mathematica.stackexchange.com/questions/1542/exporting-graphics-to-pdf-huge-file

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with

- asked by Matthew Leingang (89 votes), answered by Heike (75 votes)

—————————-

[Entering numbers in Scientific Notation?] http://mathematica.stackexchange.com/questions/36792/entering-numbers-in-scientific-notation

I need to play with a lot of powers such as 10^-3. 1E-3 does not work for it.

Is there any short form for it?

Is there any short form for it?

- asked by hhh (21 votes), answered by Rahul (30 votes)

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

[How to specify halting states when using function TuringMachine?] http://mathematica.stackexchange.com/questions/134628/how-to-specify-halting-states-when-using-function-turingmachine

The function TuringMachine generates a list that represents the evolution of a Turing Machine given a rule that specifies its behaviour (i.e. set of instructions).

For example, the following rule ...

- asked by Lili (4 votes)

—————————-

[Can I use Mathematica for the symbolic verification of cases of a general problem?] http://mathematica.stackexchange.com/questions/134515/can-i-use-mathematica-for-the-symbolic-verification-of-cases-of-a-general-proble

I have never used Mathematica before, but I am contemplating using it to solve this problem for a simple case of and and . I can easily get , the Fourier transform of ...

- asked by Rajesh Dachiraju (2 votes)

—————————-

[Antialiasing in Plot3D doesn't work well] http://mathematica.stackexchange.com/questions/134612/antialiasing-in-plot3d-doesnt-work-well

My code is very simple:

There seems some ripple on the top of the figure and I doubt whether it ...

- asked by user29114 (1 vote)

[Partitioning a number into consecutive integers] http://mathematica.stackexchange.com/questions/134252/partitioning-a-number-into-consecutive-integers

Consider n=45; then

Question: how to find all representations of a given positive integer n as a sum of ...

- asked by corey979 (17 votes), answered by corey979 (19 votes)

—————————-

[Why is my GIF shaky?] http://mathematica.stackexchange.com/questions/134272/why-is-my-gif-shaky

As you can see, the circles are shaking vertically as they approaching each other. Why is that?

The code:

- asked by Jason (13 votes), answered by Sumit (10 votes)

—————————-

[Can Mathematica edit large binary files in-place?] http://mathematica.stackexchange.com/questions/133973/can-mathematica-edit-large-binary-files-in-place

I have a very large binary data file (several hundred GB) which I would like to edit using Mathematica. The only edits required are a few isolated byte replacements—no insertions or deletions. Is it ...

- asked by David Zhang (12 votes)

—————————-

[Solving chess bishop problem] http://mathematica.stackexchange.com/questions/134218/solving-chess-bishop-problem

I have generalized the problem in this way where I have a list

I want to find the largest sublist in which the addition of the two entries for any two elements of the ...

- asked by m. bubu (10 votes), answered by ubpdqn (11 votes)

—————————-

[How to get such rule with a elegant method] http://mathematica.stackexchange.com/questions/134227/how-to-get-such-rule-with-a-elegant-method

I have two lists:

list={{1,2,3,5},{5,3,9,11,12},{5,9,10,16}};

list2={{7,89},{96,5},{-6,-98}};

This is the expected result.

{{1->{7,89},2->{7,89},3->{7,89},5->{7,89}},

...

list2={{7,89},{96,5},{-6,-98}};

This is the expected result.

{{1->{7,89},2->{7,89},3->{7,89},5->{7,89}},

...

- asked by yode (9 votes), answered by Mr.Wizard (9 votes)

—————————-

[Pseudo-currying in one line] http://mathematica.stackexchange.com/questions/134315/pseudo-currying-in-one-line

Often when I'm writing OOP code using an object-manager association I find myself doing something akin to currying the arguments to some form of delegate object or head. (Building a one-argument ...

- asked by MB1965 (8 votes), answered by Bob Hanlon (8 votes)

—————————-

[How to create a multi-graphics plot (i.e. the decomposition of phase plane portrait) with well-organized structure?] http://mathematica.stackexchange.com/questions/134228/how-to-create-a-multi-graphics-plot-i-e-the-decomposition-of-phase-plane-portr

Background

I am trying to create a three-graphics plot using the command GraphicsGrid[] to show the decomposition of the phase plane portrait; unfortunately, the plot created is very ugly since the ...

- asked by Liang.X (8 votes), answered by Sumit (8 votes)

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

[Finding Limits in several variables] http://mathematica.stackexchange.com/questions/21544/finding-limits-in-several-variables

Is there a way to find a limit of a multivariable function, like

When is continuous, we can use

- asked by Dominic Michaelis (21 votes), answered by whuber (32 votes)

—————————-

[Can Mathematica do symbolic linear algebra?] http://mathematica.stackexchange.com/questions/3242/can-mathematica-do-symbolic-linear-algebra

For instance, is there some way I can say ”let A and B be arbitrary real and matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]” and Mathematica would simplify it to B.A? ...

- asked by nikie (38 votes), answered by helen (19 votes)

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

[Graph that shows how symbols are used in an expression] http://mathematica.stackexchange.com/questions/134180/graph-that-shows-how-symbols-are-used-in-an-expression

I would like to make a graph to show how symbols build up an expression. For example, the matrix multiplication

- asked by ConvexMartian (4 votes)

—————————-

[Question about DynamicModule] http://mathematica.stackexchange.com/questions/134063/question-about-dynamicmodule

I have a such custom function:

MyCopy := DynamicModule[{from, to},

Print@Grid[{{FileNameSetter[Dynamic[from], "Directory"],

Dynamic[from]}, {FileNameSetter[Dynamic[to], "Directory"],

...

Print@Grid[{{FileNameSetter[Dynamic[from], "Directory"],

Dynamic[from]}, {FileNameSetter[Dynamic[to], "Directory"],

...

- asked by yode (3 votes)

—————————-

[General solution of inscribed square problem] http://mathematica.stackexchange.com/questions/134237/general-solution-of-inscribed-square-problem

There is my earlier question about Inscribed square problem

Now I tried to find the general solution for any curve .

For instance :

...

- asked by vito (5 votes)

[How can I work with RawArray?] http://mathematica.stackexchange.com/questions/133666/how-can-i-work-with-rawarray

RawArray seems to be able to efficiently hold integer and floating point data of various sizes.

What is RawArray good for? How can we use it?

- asked by Szabolcs (19 votes), answered by Szabolcs (15 votes)

—————————-

[Random points around the given curve] http://mathematica.stackexchange.com/questions/133682/random-points-around-the-given-curve

How to plot a random points around the following Helix curve?

ParametricPlot3D[{6 Cos[t], 6 Sin[t], t}, {t, -2 , 4 },

PlotTheme -> "Detailed", PlotStyle -> {Blue, Thickness[Large]},

...

PlotTheme -> "Detailed", PlotStyle -> {Blue, Thickness[Large]},

...

- asked by vito (14 votes), answered by J. M. (15 votes)

—————————-

[Intuition behind FoldPair and SequenceFold?] http://mathematica.stackexchange.com/questions/133625/intuition-behind-foldpair-and-sequencefold

In trawling through the documentation I've found the functions FoldPairList and SequenceFoldList. Examples are given of how to use FoldPairList:

Partition a list into sublists of different lengths ...

- asked by pdmclean (12 votes), answered by andre (4 votes)

—————————-

[Product of two lists] http://mathematica.stackexchange.com/questions/133723/product-of-two-lists

Please, for the two lists:

L1 := {{a, b}, {c, d}, {e, f}}

L2 := {{g, h, i}, {j, k, q}}

I need the result

{{{a g, a h, a i}, {c g, c h, c i}, {e g, e h, e i}},

{{b j, b k, b q}, {d j, d k, d ...

L2 := {{g, h, i}, {j, k, q}}

I need the result

{{{a g, a h, a i}, {c g, c h, c i}, {e g, e h, e i}},

{{b j, b k, b q}, {d j, d k, d ...

- asked by Ali (11 votes), answered by xzczd (13 votes)

—————————-

[Is there something similar to seaborn stripplot in mathematica] http://mathematica.stackexchange.com/questions/133634/is-there-something-similar-to-seaborn-stripplot-in-mathematica

Is there something similar to seaborn stripplot in mathematica? The graph I am trying to make is like this:

- asked by Yordan (11 votes), answered by Brett Champion (12 votes)

—————————-

[Collapsible Tree] http://mathematica.stackexchange.com/questions/133492/collapsible-tree

Has somebody tried to program for data visualization an interactive Collapsible Tree like shown here: http://bl.ocks.org/mbostock/4339083. This implements the Reingold-Tilford algorithm.

...

- asked by mrz (8 votes)

—————————-

[FindDistributionParameters fails with custom distribution which cannot be evaluated symbolically] http://mathematica.stackexchange.com/questions/133456/finddistributionparameters-fails-with-custom-distribution-which-cannot-be-evalua

Context

I am interested in measuring the dark energy equation of state of the universe while fitting the PDF of density in cells. This involves fitting a one parameter PDF to some data.

Following ...

- asked by chris (7 votes)

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

[How can I draw the Olympic rings with Mathematica?] http://mathematica.stackexchange.com/questions/8885/how-can-i-draw-the-olympic-rings-with-mathematica

How can I draw the 5 interlocking Olympic rings with Mathematica?

(SVG version)

Edit

Hard choice, but some pretty cool answers here. I didn't have 3D answers in mind when I posted the question, ...

- asked by Mike Honeychurch (42 votes), answered by cormullion (19 votes)

—————————-

[Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...

- asked by J. M. (448 votes), answered by faysou (397 votes)

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

[Symbolic Weak Form] http://mathematica.stackexchange.com/questions/133575/symbolic-weak-form

Usually I write the weak form by hand for my FEM code, but it's a little annoying and mechanic sometimes.

So, I wonder, is there any way to generate the symbolic weak form in Mathematica? For ...

- asked by senseiwa (5 votes)

—————————-

[Why is Minimize spinning?] http://mathematica.stackexchange.com/questions/133789/why-is-minimize-spinning

The command

Minimize[a^2 + b^2 + c^2 + a*b + b*c + a*c -

(a + b - c)*Sqrt[2 a*b + b*c + a*c] - (b + c - a)* Sqrt[2 b*c + b*a + a*c] -

(a + c - b)*Sqrt[2 a*c + a*b + b*c], a >= 0 && b ...

(a + b - c)*Sqrt[2 a*b + b*c + a*c] - (b + c - a)* Sqrt[2 b*c + b*a + a*c] -

(a + c - b)*Sqrt[2 a*c + a*b + b*c], a >= 0 && b ...

- asked by user64494 (4 votes)

—————————-

[How to export an MXNet?] http://mathematica.stackexchange.com/questions/133857/how-to-export-an-mxnet

I was hoping there was some way to generate the .params and .json file needed to define an MXNet model, from a network trained using NetTrain[] in Mathematica:

I see these functions in the ...

- asked by user5601 (5 votes)

[Query: adding additional operator changes meaning of preceding operators] http://mathematica.stackexchange.com/questions/133124/query-adding-additional-operator-changes-meaning-of-preceding-operators

Consider the following query:

It selects the even numbers, applies f to them and finally appends 1 to the list. As expected, ...

- asked by WReach (15 votes), answered by WReach (15 votes)

—————————-

[Why does Mathematica think this series doesn't converge?] http://mathematica.stackexchange.com/questions/132982/why-does-mathematica-think-this-series-doesnt-converge

Bug introduced in 10.0 and persisting through 11.0 (reported as CASE:3790525)

Here's a simple series:

Mathematica says that it doesn't converge. But ...

- asked by Ruslan (13 votes), answered by Jules Lamers (9 votes)

—————————-

[Joining two lists with relational operators] http://mathematica.stackexchange.com/questions/132928/joining-two-lists-with-relational-operators

I have two lists liste = {x, -y, y, -z} and

listv = {1, -2, 3, -4}, which represent the inequities

obtained evaluating liste - listv <= 0. How do I reassemble or

join those two separate lists into ...

listv = {1, -2, 3, -4}, which represent the inequities

obtained evaluating liste - listv <= 0. How do I reassemble or

join those two separate lists into ...

- asked by nanjun (13 votes), answered by Kuba (15 votes)

—————————-

[What assumptions do I need to make Mathematica integrate a function?] http://mathematica.stackexchange.com/questions/133052/what-assumptions-do-i-need-to-make-mathematica-integrate-a-function

When I feed Mathematica the following integral:

it spits it back out without evaluating it. However, it can evaluate the integral

- asked by user45146 (11 votes), answered by Artes (12 votes)

—————————-

[Do Apple Watch + Mathematica integrations still work?] http://mathematica.stackexchange.com/questions/133358/do-apple-watch-mathematica-integrations-still-work

I tried to follow this blog post: Instant Apps for Apple Watch, but none of the examples given worked, instead, they would simply hang on the ”loading” screen.

Can anyone verify if this ...

- asked by M.R. (9 votes)

—————————-

[Locate Start and End Positions of Repeated Sequences in a list] http://mathematica.stackexchange.com/questions/133164/locate-start-and-end-positions-of-repeated-sequences-in-a-list

ListA = 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 12, 12, 12, 14, 14, 14, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, ...

- asked by SPIL (8 votes), answered by Suba Thomas (5 votes)

—————————-

[How can I add noise to a neural network input?] http://mathematica.stackexchange.com/questions/133090/how-can-i-add-noise-to-a-neural-network-input

A common ”trick” in neural network training is to train an autoencoder using a ”degraded” sample as input and the original sample as target output. The layer type DropoutLayer[] is made for this ...

- asked by nikie (8 votes), answered by nikie (5 votes)

[Can Mathematica do symbolic linear algebra?] http://mathematica.stackexchange.com/questions/3242/can-mathematica-do-symbolic-linear-algebra

For instance, is there some way I can say ”let A and B be arbitrary real and matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]” and Mathematica would simplify it to B.A? ...

- asked by nikie (38 votes), answered by helen (19 votes)

—————————-

[Calculate the 2D Fourier transform of an Image] http://mathematica.stackexchange.com/questions/29203/calculate-the-2d-fourier-transform-of-an-image

I am new to Mathematica, and using version 8.0.

I would like to calculate the 2D Fourier Transform of an Image with Mathematica and plot the magnitude and phase spectrum, as well as reconstruct the ...

- asked by user8727 (5 votes), answered by Nasser (27 votes)

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

[Mathematica script, called from Windows task scheduler, does not export graphics] http://mathematica.stackexchange.com/questions/133075/mathematica-script-called-from-windows-task-scheduler-does-not-export-graphics

When I run the following script from command line,

Needs["JLink`"];

ConnectToFrontEnd[];

resultChart = UseFrontEnd[JuliaSetPlot[0.365 - 0.37 I]];

UseFrontEnd[Export["test.png", resultChart]];

ConnectToFrontEnd[];

resultChart = UseFrontEnd[JuliaSetPlot[0.365 - 0.37 I]];

UseFrontEnd[Export["test.png", resultChart]];

...

- asked by Karsten W. (2 votes)

—————————-

[Is it possible to do matrix algebra symbolically?] http://mathematica.stackexchange.com/questions/132955/is-it-possible-to-do-matrix-algebra-symbolically

I'm reading a book that has the following theorem:

I am trying to make Mathematica perform these calculations for me. Is it possible to do it without having to declare the matrices? For ...

- asked by Oppa Hilbert Style (2 votes)

—————————-

[Making graphic objects disappear interactively] http://mathematica.stackexchange.com/questions/133256/making-graphic-objects-disappear-interactively

I am trying to create a program where dots on a plane disappear when an object passes over them. I am using EventHandler to code the arrow keys for control of the object. I want each dot to ...

- asked by Savannah S (1 vote)

[How to find arXiv articles] http://mathematica.stackexchange.com/questions/132685/how-to-find-arxiv-articles

I found at Twitter that is possible to search for arXiv articles with Mathematica:

E.g. the following code:

- asked by mrz (16 votes), answered by user21 (11 votes)

—————————-

[Find lane lines] http://mathematica.stackexchange.com/questions/132443/find-lane-lines

A crucial step in self-driving car is to detect lane lines. I'm wondering whether this can be achieved robustly using Mathematica's rich image processing tools.

For example how can I take camera ...

- asked by xslittlegrass (14 votes), answered by nikie (14 votes)

—————————-

[Neural Network for polynomial fit] http://mathematica.stackexchange.com/questions/132546/neural-network-for-polynomial-fit

I'm trying to build up a neural network with Mathematica 11.0, that should fit data which behaves like a polynom of third order. I thought that an NN with one or two hidden layers can fit any ...

- asked by A.Zachl (12 votes), answered by nikie (9 votes)

—————————-

[How to make notebooks suitable for the Documentation Center?] http://mathematica.stackexchange.com/questions/132392/how-to-make-notebooks-suitable-for-the-documentation-center

Normally, documentation meant to be integrated into the Documentation Center is built from special source notebooks.

According to the Workbench documentation, it should also be possible to use ...

- asked by Szabolcs (12 votes), answered by jkuczm (5 votes)

—————————-

[Largest palindrome from given string] http://mathematica.stackexchange.com/questions/132834/largest-palindrome-from-given-string

Someone recently posted a request on LinkedIn for an algorithm to find the largest palindrome from a given string.

I came up with this, which I believe does the trick, but I am wondering if there ...

- asked by Jonathan Kinlay (10 votes), answered by Kuba (10 votes)

—————————-

[Why Function is not identical to `&` in autocompilation?] http://mathematica.stackexchange.com/questions/132656/why-function-is-not-identical-to-in-autocompilation

Here is the example, copied from here

the timing and unpacking status shows

data = RandomReal[0, 10, 10000];

...

- asked by matheorem (10 votes), answered by m_goldberg (4 votes)

—————————-

[Analytic solution to Newtonian gravity differential equation] http://mathematica.stackexchange.com/questions/132875/analytic-solution-to-newtonian-gravity-differential-equation

I was told that I could obtain an analytic solution to a particle falling under the influence of Newtonian gravity by using DSolveValue.

What I am given

is a point mass at ...

- asked by Joe (9 votes), answered by Kagaratsch (9 votes)

[Unit Discovery: Is this some sort of a sick joke?] http://mathematica.stackexchange.com/questions/124745/unit-discovery-is-this-some-sort-of-a-sick-joke

Alright, let's have some fun here. I am essentially following the documentation by Wolfram, just looking at different quantities.

Hmm, ...

- asked by Pirx (30 votes), answered by xavier (30 votes)

—————————-

[How can Mathematica be used to create images like these?] http://mathematica.stackexchange.com/questions/118992/how-can-mathematica-be-used-to-create-images-like-these

Here are two examples of artistic image interpolation using just black lines:

TRIANGULATION: ANGULAR CELEBRITIES DRAWN WITH A PEN Interpolation for Triangulation-represented Digital Image

The ...

- asked by R Hall (28 votes), answered by MarcoB (29 votes)

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

[How to find a value to make function positive and real?] http://mathematica.stackexchange.com/questions/132883/how-to-find-a-value-to-make-function-positive-and-real

Let

x=(((-3 + r) r^2 + a^2 (1 + r)) Csc[])/(a (-1 + r))

y=Sqrt[(a^2 (a^2 (1 + r)^2 + 2 r^2 (-3 + r^2)) +

a^4 (-1 + r)^2 Cos[]^2 - ((-3 + r) r^2 +

a^2 (1 + r))^2 Csc[]^2)/(a^2 (-1 + r)^2)]

y=Sqrt[(a^2 (a^2 (1 + r)^2 + 2 r^2 (-3 + r^2)) +

a^4 (-1 + r)^2 Cos[]^2 - ((-3 + r) r^2 +

a^2 (1 + r))^2 Csc[]^2)/(a^2 (-1 + r)^2)]

...

- asked by MrDi (1 vote)

—————————-

[Creating an automatic code feedback for class] http://mathematica.stackexchange.com/questions/132880/creating-an-automatic-code-feedback-for-class

I'm trying to create a server application that accepts uploaded Mathematica files (that follow a certain API), then run a few tests on modules defined within those files. This is for a course where ...

- asked by michael99man (1 vote)

—————————-

[Nontrivial background removal] http://mathematica.stackexchange.com/questions/132844/nontrivial-background-removal

I have an image of a product on a poorly made green screen and need to segment out just the product:

The problem is that it contains a mirror, so simple color-based methods are not enough.

I tried ...

- asked by M.R. (4 votes)

[PacletInfo.m documentation project] http://mathematica.stackexchange.com/questions/132064/pacletinfo-m-documentation-project

Packages can be made into paclets, which provides easy distribution and versioning. The paclet metadata is in the PacletInfo.m file. The PacletInfo settings also determine how the paclet can extend ...

- asked by Szabolcs (25 votes), answered by Szabolcs (22 votes)

—————————-

[Replace custom functions, leave built in functions untouched?] http://mathematica.stackexchange.com/questions/131938/replace-custom-functions-leave-built-in-functions-untouched

I have three expressions a[x, y], b[x, y], c[x, y] that act as

placeholders for functions of two variables x,y. Consider the following substitution:

a[x, y]/(b[x, y] c[x, y]) /. f_[x1_, y1_] :> ...

- asked by Kagaratsch (16 votes), answered by Mr.Wizard (18 votes)

—————————-

[Why CompilationTarget -¿ C is slower than directly writing with C?] http://mathematica.stackexchange.com/questions/132130/why-compilationtarget-c-is-slower-than-directly-writing-with-c

Probably a hard question, but I think it's better to cry out loud.

I've hesitated for a while about whether I should post this in StackOverflow with a c tag or not, but finally decide to keep it ...

- asked by xzczd (15 votes), answered by Albert Retey (11 votes)

—————————-

[Detecting kernel initialization] http://mathematica.stackexchange.com/questions/132212/detecting-kernel-initialization

Certain operations do not work during kernel initialization. Code from Kernel/init.m, the Autoload directory, or packages set to autoload may evaluate at initialization time.

Is there a way to ...

- asked by Szabolcs (12 votes), answered by Szabolcs (10 votes)

—————————-

[How can I change the default file type for ”Save Selection As”] http://mathematica.stackexchange.com/questions/132224/how-can-i-change-the-default-file-type-for-save-selection-as

When using the menu item File - Save Selection As, the default file type is PDF. Is there any way to change the default to something else, for example PNG?

- asked by Simon Woods (12 votes), answered by Mike Honeychurch (13 votes)

—————————-

[How to obtain the ViewPoint] http://mathematica.stackexchange.com/questions/132228/how-to-obtain-the-viewpoint

Normally, I used ViewPoint in the code in Plot3D. Most of the time, I will use mouse to rotate the 3D object to get a better view point. The problem is, when I find the best view point for me, is ...

- asked by Qi Zhong (12 votes), answered by Jack LaVigne (14 votes)

—————————-

[Wonky Solutions to Schrödinger Equation with Box Barrier] http://mathematica.stackexchange.com/questions/131854/wonky-solutions-to-schr%C3%B6dinger-equation-with-box-barrier

I'm trying to solve the Schrödinger equation using NDSolve in a case where there is a potential box barrier. The initial condition is a cosine wave, and for boundary conditions I require that the ...

- asked by Buddhapus (8 votes), answered by xzczd (4 votes)

[Can Mathematica do symbolic linear algebra?] http://mathematica.stackexchange.com/questions/3242/can-mathematica-do-symbolic-linear-algebra

For instance, is there some way I can say ”let A and B be arbitrary real and matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]” and Mathematica would simplify it to B.A? ...

- asked by nikie (35 votes), answered by helen (18 votes)

—————————-

[How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc] http://mathematica.stackexchange.com/questions/66273/how-to-tell-mathematica-that-certain-variables-are-real-imaginary-integer-value

I'm trying to expedite some quantum mechanical calculations by running them through Mathematica. Expectation values and stuff like that. When I say, for example,

- asked by Matthew Brunetti (9 votes), answered by SquareOne (7 votes)

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

[Is it possible to change the text cursor's shape and color?] http://mathematica.stackexchange.com/questions/132322/is-it-possible-to-change-the-text-cursors-shape-and-color

I find it visually pleasant to reverse the background and foreground colors when working on a notebook; as shown below, in fact, it's almost a requirement after working long hours on the same ...

- asked by Jerome Ibanes (1 vote)

—————————-

[FindClusters doesn't accept custom DistanceFunction] http://mathematica.stackexchange.com/questions/132287/findclusters-doesnt-accept-custom-distancefunction

I have a problem with using custom DistanceFunction in FindClusters. To make the issue as simple as possible, consider clustering odd & even numbers in the following way:

...

- asked by ahrvoje (6 votes)

—————————-

[FrameLabel is Broken for ArrayPlot and MatrixPlot] http://mathematica.stackexchange.com/questions/132008/framelabel-is-broken-for-arrayplot-and-matrixplot

In version 11.0.1 the documentation for FrameLabel states its format is

left, right, bottom, top

However, it appears that this is not the case for MatrixPlot.

...

- asked by Edmund (5 votes)

[Create the source image for this cool animated illusion] http://mathematica.stackexchange.com/questions/131644/create-the-source-image-for-this-cool-animated-illusion

Have a look at this very awesome video:

https://www.youtube.com/watch?v=lvvcRdwNhGM

You have a vertically discretized image, which is composed of 5 or 6 images, which are shifted by an increment, as ...

- asked by DoHe (22 votes), answered by corey979 (25 votes)

—————————-

[Restarting Mathematica automatically] http://mathematica.stackexchange.com/questions/131573/restarting-mathematica-automatically

I run a large computation in a loop. At each cycle of the loop I produce large arrays that I save on a disk. At each cycle I would like to Quit Mathematica and then restart automatically, loading ...

- asked by Vadim (15 votes), answered by Szabolcs (14 votes)

—————————-

[How to handle package dependencies?] http://mathematica.stackexchange.com/questions/131567/how-to-handle-package-dependencies

When an application written in C++ depends on some libraries, the libraries are usually shipped together with the application. Two applications that depend on the same library will not share the same ...

- asked by Szabolcs (11 votes), answered by Kuba (3 votes)

—————————-

[How to sample many points below a curve?] http://mathematica.stackexchange.com/questions/131755/how-to-sample-many-points-below-a-curve

I have plotted the curve, and I wanted to take 1000 points in the shaded area uniformly. How can I make it?

- asked by ZHANG Juenjie (10 votes), answered by bbgodfrey (11 votes)

—————————-

[how to style multi-value interpolation function plot?] http://mathematica.stackexchange.com/questions/131516/how-to-style-multi-value-interpolation-function-plot

Is there a cleaner way to apply different styles to the different channels of a multi value interpolation function?

here is a 2-output interpolation function:

- asked by george2079 (10 votes), answered by Michael E2 (7 votes)

—————————-

[Backtesting a Probability of Default (PD) model] http://mathematica.stackexchange.com/questions/131347/backtesting-a-probability-of-default-pd-model

Background

PD models

Financial institutions use Probability of Default (PD) models for various purposes such as client acceptance, provisioning and regulatory capital calculation as required by the ...

- asked by Sjoerd C. de Vries (10 votes), answered by Sjoerd C. de Vries (14 votes)

—————————-

[Display bug in Dataset's UnitConvert handling] http://mathematica.stackexchange.com/questions/131332/display-bug-in-datasets-unitconvert-handling

Bug introduced in 11.0.1 (or possibly 11.0.0)

Is this yet another annoying regression in v11 Dataset type handling? The display form seems to be a formatting bug:

The numerator and denominator of ...

- asked by alancalvitti (10 votes), answered by WReach (4 votes)

[Exporting graphics to PDF - huge file] http://mathematica.stackexchange.com/questions/1542/exporting-graphics-to-pdf-huge-file

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with

- asked by Matthew Leingang (85 votes), answered by Heike (74 votes)

—————————-

[How to create a new ”person curve”?] http://mathematica.stackexchange.com/questions/17704/how-to-create-a-new-person-curve

Wolfram—Alpha has a whole collection of parametric curves that create images of famous people. To see them, enter WolframAlpha[”person curve”] into a Mathematica notebook, or person curve into ...

- asked by Simon (61 votes), answered by Vitaliy Kaurov (30 votes)

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

[Unix-like reference to parent and root Association?] http://mathematica.stackexchange.com/questions/131337/unix-like-reference-to-parent-and-root-association

Is there a syntax or function to reference parent and root

when querying nested Associations similar to Unix'

".." and "/", eg "cd ../../mydir". ?

when querying nested Associations similar to Unix'

".." and "/", eg "cd ../../mydir". ?

Here's a typical application of the root ...

- asked by alancalvitti (3 votes)

—————————-

[Strange behaviour of FullSimplify when checking an equality of SparseArray's] http://mathematica.stackexchange.com/questions/131400/strange-behaviour-of-fullsimplify-when-checking-an-equality-of-sparsearrays

I stumbled upon the following strange behaviour. Disclaimer: I present the simplest instance that I could find in which some behaviour occurs that I first noticed in a different, more complicated ...

- asked by Jules Lamers (1 vote)

—————————-

[ListPlot PlotRange Ignored with all Missing or empty data] http://mathematica.stackexchange.com/questions/131321/listplot-plotrange-ignored-with-all-missing-or-empty-data

I have a function that uses ListPlot to draw a custom plot. When a data value is not applicable I pass in Missing to prevent ListPlot and its Prolog option from displaying the point the function will ...

- asked by Edmund (3 votes)

[Why (and when) does pattern matching with f[__] perform MUCH more quickly than _f?] http://mathematica.stackexchange.com/questions/130984/why-and-when-does-pattern-matching-with-f-perform-much-more-quickly-than

Consider this expression in Mathematica 10.3 (and above) on MacOS X:

Now compare the time it takes to apply the following ...

- asked by QuantumDot (22 votes), answered by WReach (17 votes)

—————————-

[Getting wrong limit with Bessel] http://mathematica.stackexchange.com/questions/130741/getting-wrong-limit-with-bessel

I computed a following limit (related to the asymptotic expansion of the sequence A000009 - number of partitions of n into distinct parts)

- asked by Vaclav Kotesovec (11 votes), answered by Akku14 (9 votes)

—————————-

[Join lists by observing x-value] http://mathematica.stackexchange.com/questions/130903/join-lists-by-observing-x-value

Hi everybody I have as a small test with two datasets (normally I have 100 datasets with 4100 brackets):

- asked by Jacccy (10 votes), answered by ubpdqn (13 votes)

—————————-

[How to distribute Mathematica packages as paclets?] http://mathematica.stackexchange.com/questions/131101/how-to-distribute-mathematica-packages-as-paclets

Mathematica does have a nice package manager. Packages are called paclets, and they can be managed using the functions from the PacletManager‘ context.

How can I package up my own packages as ...

- asked by Szabolcs (9 votes), answered by Szabolcs (7 votes)

—————————-

[Does function call via @ ignore HoldFirst attribute?] http://mathematica.stackexchange.com/questions/130889/does-function-call-via-ignore-holdfirst-attribute

I was trying to test whether using func[x,y] is the same as func[#,y]&@x:

SetAttributes[test, HoldFirst]

test[1 + 2 - 3, 5 - 5]

test[#, 5 - 5] &@(1 + 2 - 3)

test[1 + 2 - 3, 0]

test[1 + 2 - 3, 5 - 5]

test[#, 5 - 5] &@(1 + 2 - 3)

test[1 + 2 - 3, 0]

...

- asked by Ruslan (8 votes), answered by m_goldberg (9 votes)

—————————-

[Graph visualization: Leave gap between vertex and endpoint of edge] http://mathematica.stackexchange.com/questions/130821/graph-visualization-leave-gap-between-vertex-and-endpoint-of-edge

This is a nice graph:

g = CycleGraph[4];

Graph[g, VertexCoordinates -> {{0, 0}, {0, 1}, {1, 1}, {1, 0}},

VertexLabels -> Placed["Name", Center], VertexSize -> Medium,

EdgeShapeFunction ...

Graph[g, VertexCoordinates -> {{0, 0}, {0, 1}, {1, 1}, {1, 0}},

VertexLabels -> Placed["Name", Center], VertexSize -> Medium,

EdgeShapeFunction ...

- asked by cyrille.piatecki (8 votes), answered by kglr (12 votes)

—————————-

[Help finding the centre of a faint, incomplete circle?] http://mathematica.stackexchange.com/questions/130787/help-finding-the-centre-of-a-faint-incomplete-circle

so I found a program in the answers to this question that I thought was brilliant, so here it is applied to my situation: I have the image

and here's the code:

...

- asked by Mason (8 votes)

[How can Mathematica be used to create images like these?] http://mathematica.stackexchange.com/questions/118992/how-can-mathematica-be-used-to-create-images-like-these

Here are two examples of artistic image interpolation using just black lines:

TRIANGULATION: ANGULAR CELEBRITIES DRAWN WITH A PEN Interpolation for Triangulation-represented Digital Image

The ...

- asked by R Hall (28 votes), answered by MarcoB (29 votes)

—————————-

[How do you make a Neural Net?] http://mathematica.stackexchange.com/questions/123458/how-do-you-make-a-neural-net

In the new Mathematica release (v11), NeuralNetworks is one of the new main features. However, the documentation isn't that clear on what function should be used in a Net.

The documentation on ...

- asked by JHM (22 votes), answered by Searke (24 votes)

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

[Understanding the structure of an InterpolatingFunction] http://mathematica.stackexchange.com/questions/131063/understanding-the-structure-of-an-interpolatingfunction

returns:

InterpolatingFunction[ 0., 9., 5, 3, 0, 13, 4, 0, 0, 0, 0, Automatic, , , False, 0., 0.75, 1.5, 2.25, 3., 3.75, ...

- asked by anderstood (1 vote)

—————————-

[Is it possible to create .stp 3D model from Graphics3D?] http://mathematica.stackexchange.com/questions/130883/is-it-possible-to-create-stp-3d-model-from-graphics3d

I want to create some 3D solid model by Mathematica, and then export it into stp (step) format for further finite element or finite volume analysis in Fluent/ANSYS or Abaqus.

But so far to me, it ...

- asked by user6043040 (3 votes)

—————————-

[Time constrained loop unit] http://mathematica.stackexchange.com/questions/131159/time-constrained-loop-unit

I have a particularly difficult loop, in that it consists of two variables looping and sowing the result if a criteria is met. Overall it works for me, but some certain values for my variables take ...

- asked by Castle (2 votes)

[For a better animation of the solution from NDSolve] http://mathematica.stackexchange.com/questions/130502/for-a-better-animation-of-the-solution-from-ndsolve

I obtained a numerical solution from the following code with NDSolve

L = 20;

tmax = 27;

\[Sigma] = 2;

myfun = First[h /. NDSolve[{D[h[x, y, t], t] +

Div[h[x, y, t]^3*Grad[Laplacian[h[x, y, t], {x, ...

tmax = 27;

\[Sigma] = 2;

myfun = First[h /. NDSolve[{D[h[x, y, t], t] +

Div[h[x, y, t]^3*Grad[Laplacian[h[x, y, t], {x, ...

- asked by jsxs (12 votes), answered by Nasser (14 votes)

—————————-

[A puzzling result of ”FullSimplify”] http://mathematica.stackexchange.com/questions/130606/a-puzzling-result-of-fullsimplify

When I input:

the result is the ideal answer 1

Howeverif I input:

- asked by dabuyang (11 votes), answered by Bob Hanlon (7 votes)

—————————-

[ImageFeatureTrack or ImageDisplacements to measure average object velocities in images] http://mathematica.stackexchange.com/questions/130391/imagefeaturetrack-or-imagedisplacements-to-measure-average-object-velocities-in

I have as example a set of 30 gray scale images (8bit, 568*478 pixels, they are avalable here: http://tinyurl.com/zckyv9w where bright objects on dark background move from image to image mainly ...

- asked by mrz (9 votes), answered by Simon Woods (10 votes)

—————————-

[Documentation Tools: Don't put web URL in user package docs] http://mathematica.stackexchange.com/questions/130515/documentation-tools-dont-put-web-url-in-user-package-docs

I am exploring the Workbench documentation tools for the first time and one of the difficulties I encountered was that every generated (compiled) documentation page includes weblinks. These point to ...

- asked by Szabolcs (9 votes)

—————————-

[How to make plots 'blacker'?] http://mathematica.stackexchange.com/questions/130471/how-to-make-plots-blacker

I need to make a contour plot for publication, but even if I

set ContourStyle->Black, the 'black' plots and the axes are very faint.

When I export the figure in svg and open it in some ...

set ContourStyle->Black, the 'black' plots and the axes are very faint.

When I export the figure in svg and open it in some ...

- asked by Physicist (9 votes), answered by Michael E2 (10 votes)

—————————-

[How to specify algebraic relations between objects?] http://mathematica.stackexchange.com/questions/130258/how-to-specify-algebraic-relations-between-objects

so I'm wanting to screw around a bit with Geometric Algebra in Mathematica. To start, I want to create some basis objects: and then specify the relations between them which are

- asked by Mason (9 votes), answered by march (9 votes)

—————————-

[Crack it If you Can? BUT in the BEST way] http://mathematica.stackexchange.com/questions/130566/crack-it-if-you-can-but-in-the-best-way

From the Wolfram Community:

Hello everyone,

A little while ago I was asked to solve this ”safe cracker” puzzle, a sweet example of a coffee table puzzle. The basic gist of this puzzle is that it ...

- asked by Youphyso (8 votes), answered by george2079 (4 votes)

[Writing a word with straight lines] http://mathematica.stackexchange.com/questions/113403/writing-a-word-with-straight-lines

Here is an interesting way to write a word: (it is from a poster for the International Museum Day 2006; I believe it even won an award at an international design competition)

by Boris Ljubicic. ...

- asked by VividD (72 votes), answered by Anton Antonov (34 votes)

—————————-

[Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...

- asked by J. M. (441 votes), answered by faysou (396 votes)

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

[Passing boolean parameters to a .NET Method using NETLink] http://mathematica.stackexchange.com/questions/130658/passing-boolean-parameters-to-a-net-method-using-netlink

According to the NETLink documentation, NETLink automatically handles type conversions from Mathematica to a .NET dll. One of the issues I have is that the .NET method I want to use expects a Boolean ...

- asked by user39464 (1 vote)

—————————-

[ParametricPlot3D Self Intersection] http://mathematica.stackexchange.com/questions/130460/parametricplot3d-self-intersection

I would like to know where my ParametricPlot3D intersects itself and to extract all intersections (points, lines, surfaces...) to animate them by changing P:

- asked by chkone (3 votes)

—————————-

[Faster solution to combinatorial problem of two-part contractions] http://mathematica.stackexchange.com/questions/130598/faster-solution-to-combinatorial-problem-of-two-part-contractions

Given a list of elements I need all possible pairings of elements with a leading factor that describes the number of permutations. A (ugly but) working version would be:

- asked by pbx (2 votes)

[Huge bug involving MultinormalDistribution?] http://mathematica.stackexchange.com/questions/129916/huge-bug-involving-multinormaldistribution

Bug introduced in 8.0 or earlier and persisting through 11.0.1

I found a strange behavior regarding the CDF of the bivariate Normal distribution

...

- asked by fwgb (21 votes), answered by Eric Towers (19 votes)

—————————-

[GeoDistance - higher spatial resolution / precision?] http://mathematica.stackexchange.com/questions/130044/geodistance-higher-spatial-resolution-precision

I'm having a small problem with GeoDistance.

I've chosen a target city – San Francisco – and I've computed distances from SF to five other cities. Then I draw circles around each city, with radius ...

- asked by ConvexMartian (9 votes), answered by jose (4 votes)

—————————-

[How to extract the first dimension in TimeSeries?] http://mathematica.stackexchange.com/questions/129836/how-to-extract-the-first-dimension-in-timeseries

I want to extract the first dimension in TimeSeriesfor example:

So I use this code:

data = Normal@AudioLocalMeasurements[ExampleData[{"Audio", "PianoScale"}],"MFCC"];

Thread[{data[[All, 1]], ...

Thread[{data[[All, 1]], ...

- asked by partida (9 votes), answered by kglr (6 votes)

—————————-

[How to recover Pauli matrices properties in Mathematica?] http://mathematica.stackexchange.com/questions/129799/how-to-recover-pauli-matrices-properties-in-mathematica

I want to do a cross or dot product involving a vector of Pauli matrices =(1,2,3); for example, x=2i or .=3I.

Is there a simple way to do these operations?

- asked by user3654016 (8 votes), answered by corey979 (10 votes)

—————————-

[Flatten sublists within a bigger list] http://mathematica.stackexchange.com/questions/130011/flatten-sublists-within-a-bigger-list

Really sorry if this question is a duplicate. I couldn't find exactly what I was looking for.

Here is a list I have:

- asked by jrekier (7 votes), answered by Edmund (6 votes)

—————————-

[7-dimensional cross product] http://mathematica.stackexchange.com/questions/129863/7-dimensional-cross-product

How to define a 7-dimensional cross product?

$$\begin{aligned}\mathbf {x} \times \mathbf {y} =(x_{2}y_{4}-x_{4}y_{2}+x_{3}y_{7}-x_{7}y_{3}+x_{5}y_{6}-x_{6}y_{5})\,&\mathbf {e} ...

- asked by corey979 (7 votes), answered by Sumit (4 votes)

—————————-

[How to draw a clock-diagram?] http://mathematica.stackexchange.com/questions/129960/how-to-draw-a-clock-diagram

I found a clock-diagram in a paper, so I would like to draw it in Mathematica. The main trouble for me is the corresponding line segments on the circle.

I would let the data1 lie the outside on the ...

- asked by user123 (7 votes), answered by Feyre (7 votes)

[How can Mathematica be used to create images like these?] http://mathematica.stackexchange.com/questions/118992/how-can-mathematica-be-used-to-create-images-like-these

Here are two examples of artistic image interpolation using just black lines:

TRIANGULATION: ANGULAR CELEBRITIES DRAWN WITH A PEN Interpolation for Triangulation-represented Digital Image

The ...

- asked by R Hall (28 votes), answered by MarcoB (29 votes)

—————————-

[How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc] http://mathematica.stackexchange.com/questions/66273/how-to-tell-mathematica-that-certain-variables-are-real-imaginary-integer-value

I'm trying to expedite some quantum mechanical calculations by running them through Mathematica. Expectation values and stuff like that. When I say, for example,

- asked by Matthew Brunetti (8 votes), answered by SquareOne (6 votes)

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

[How to Inset a legend in GeoGraphics with Scaled LegendMarkerSize?] http://mathematica.stackexchange.com/questions/130060/how-to-inset-a-legend-in-geographics-with-scaled-legendmarkersize

I have a GeoGraphics where I am using Scaled in PointSize to include size information. I want to Inset a PointLegend that describes the sizes of the points.

Outside of GeoGraphics I can do this by ...

- asked by Edmund (2 votes)

—————————-

[NumberLinePlot with Exponential] http://mathematica.stackexchange.com/questions/129938/numberlineplot-with-exponential

I have:

Clear[f, x]

f[x_] = Exp[1/x]

Now, the question is "where is the derivative negative?" I

managed to get the Reduce command to work by adding Reals.

Reduce[f'[x] < 0, x, Reals]

f[x_] = Exp[1/x]

Now, the question is "where is the derivative negative?" I

managed to get the Reduce command to work by adding Reals.

Reduce[f'[x] < 0, x, Reals]

Which ...

- asked by David (3 votes)

—————————-

[Detect numbers on the image] http://mathematica.stackexchange.com/questions/129821/detect-numbers-on-the-image

How to detect numbers on the following image

I tried:

img=Import["http://imgur.com/TDbn7sB.png"]

set = ImagePartition[img, Scaled[{1/20, 1/5}]] // Flatten

set = ImagePartition[img, Scaled[{1/20, 1/5}]] // Flatten

then I tried Classify[] but it ...

- asked by vito (3 votes)

[How to improve this plot?] http://mathematica.stackexchange.com/questions/129426/how-to-improve-this-plot

In general, the quality of Mathematica graphics is beyond praise. However, the output of Plot3D command is somewhat unexpected in the following code. Let's solve the Dirichlet problem for the ...

- asked by user64494 (11 votes), answered by Simon Woods (16 votes)

—————————-

[Neural Networks: Does Mathematica (v11) experimental code support state-of-art Models?] http://mathematica.stackexchange.com/questions/129469/neural-networks-does-mathematica-v11-experimental-code-support-state-of-art-m

Mathematica made a big step implementing Neural Networks. I checked some examples for deep learning (ChainNet), also the related link. I see that model structures such as LaNet can be developed. ...

- asked by s.s.o (10 votes), answered by Alexey Golyshev (8 votes)

—————————-

[Converting Game of Life images to lists] http://mathematica.stackexchange.com/questions/129135/converting-game-of-life-images-to-lists

I want to convert images of GoL configurations into binary matrices to run in Mathematica's CellularAutomaton. I know that there's a collection of GoL patterns in http://conwaylife.com and other ...

- asked by andandandand (10 votes), answered by C. E. (5 votes)

—————————-

[JDBC-to-ODBC bridge gone. How to connect to SQL Server now in case of Windows Authentication?] http://mathematica.stackexchange.com/questions/129160/jdbc-to-odbc-bridge-gone-how-to-connect-to-sql-server-now-in-case-of-windows-au

Connecting to our corporate SQL servers using JDBC never worked for me, perhaps related to the Windows Authentication method that is necessary in our network. However, I found out that configuring the ...

- asked by Sjoerd C. de Vries (8 votes), answered by Sjoerd C. de Vries (6 votes)

—————————-

[How to speed up calculations on big symbolic matrices?] http://mathematica.stackexchange.com/questions/129465/how-to-speed-up-calculations-on-big-symbolic-matrices

this is my first time posting something on a community of the StackExchange platform, so please feel free to correct me if I'm doing something wrong. :) Additionally you should probably know that I'm ...

- asked by TSwift (8 votes)

—————————-

[How do I 'Join' two Structured Datasets?] http://mathematica.stackexchange.com/questions/129116/how-do-i-join-two-structured-datasets

Consider the following Datasets

dsCompetitions with fields ”id”,”name”,”eventTypeId”

dsEventTypes with fields ”id”, ”name”

I want to join the datasets as follows using SQL pseudocode:

SELECT ...

- asked by nilo de roock (8 votes), answered by rcollyer (7 votes)

—————————-

[Why isn't Orderless an Attribute of And?] http://mathematica.stackexchange.com/questions/129415/why-isnt-orderless-an-attribute-of-and

In standard logic And is a commutative operator. Still, in Mathematica, And doesn't have the Orderless attribute:

This may have not been ...

- asked by Soldalma (7 votes), answered by JHM (6 votes)

[Programming the fiver game] http://mathematica.stackexchange.com/questions/120959/programming-the-fiver-game

Obviously, even if I ask a lot of question I am, obviously, still a dummy!!!!

I want to program the fiver game. It's a very simple game played solitary on a the rule is elementary : if ...

- asked by cyrille.piatecki (12 votes), answered by Mr.Wizard (19 votes)

—————————-

[How to make an inkblot?] http://mathematica.stackexchange.com/questions/3345/how-to-make-an-inkblot

How to effectively create a polygon that looks like a realistic inkblot? So far, I could come up with this (borrowing from Ed Pegg Jr.'s Rorschach demonstration):

- asked by István Zachar (83 votes), answered by Sjoerd C. de Vries (46 votes)

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

[Counting the occurences of entries in a dataset columnwise] http://mathematica.stackexchange.com/questions/129459/counting-the-occurences-of-entries-in-a-dataset-columnwise

Consider a dataset with some rows and considerably less columns (eg something like 10x3). Assume that the contents of the dataset cells are integers from some conveniently chosen range (eg 1 through ...

- asked by user42582 (1 vote)

—————————-

[List, Association, and Dataset, according to what principles to choose which one to use?] http://mathematica.stackexchange.com/questions/129081/list-association-and-dataset-according-to-what-principles-to-choose-which-one

List, Association and Dataset are three 'objects' that can be used to store data in MMA. So when or under what conditions for one to decide to use each of them?

- asked by Alexander Zeng (2 votes)

—————————-

[How to ArrayFlatten some matrix which have repeated element] http://mathematica.stackexchange.com/questions/129153/how-to-arrayflatten-some-matrix-which-have-repeated-element

I have many such matrices(whose dimension are all 3*3.) like:

list1={{0,3,0},{4,1,2},{0,5,0}};

list2={{0,6,0},{1,2,8},{0,7,0}};

list3={{0,1,0},{9,5,7},{0,11,0}};

list4={{0,2,0},{5,7,10},{0,12,0}};

list2={{0,6,0},{1,2,8},{0,7,0}};

list3={{0,1,0},{9,5,7},{0,11,0}};

list4={{0,2,0},{5,7,10},{0,12,0}};

...

- asked by yode (3 votes)

[Why removing a function and defining it on the same line does not work?] http://mathematica.stackexchange.com/questions/128818/why-removing-a-function-and-defining-it-on-the-same-line-does-not-work

Why do the two pieces of code below yield rather different results? The only difference is that in the first one the function definition is in the same line as the Remove command while in the second ...

- asked by Fernando Saldanha (17 votes), answered by dan7geo (16 votes)

—————————-

[House of Santa Claus] http://mathematica.stackexchange.com/questions/128741/house-of-santa-claus

The house of Santa Claus is an old German drawing game for small children. You have to draw a house in one line. You must not lift your pencil while drawing.

- asked by mrz (15 votes), answered by Dr. Wolfgang Hintze (9 votes)

—————————-

[how to get cell boundaries in the image] http://mathematica.stackexchange.com/questions/128596/how-to-get-cell-boundaries-in-the-image

I have a microscope image of some animal tissue and wish to get the contours for all the cells that are present in the image. the cells are connected to the neighbouring cells via these contours. At ...

- asked by Ali Hashmi (10 votes), answered by corey979 (13 votes)

—————————-

[Numerically solve the initial value problem for the 1-D wave equation] http://mathematica.stackexchange.com/questions/128516/numerically-solve-the-initial-value-problem-for-the-1-d-wave-equation

I want to solve the standard 1-dimensional wave equation using NDSolve (for ) with the following conditions:

- asked by arcbloom (8 votes), answered by xzczd (7 votes)

—————————-

[Dataset Processing: efficient ways to clean and merge sets for Life Sciences] http://mathematica.stackexchange.com/questions/128519/dataset-processing-efficient-ways-to-clean-and-merge-sets-for-life-sciences

Dataset Processing (for Life Sciences)

Note: a related, but distinct task is posted here ID Swapping: Efficient use of a reference table to convert ID values.

A common task, at least for me, ...

- asked by SumNeuron (8 votes), answered by SumNeuron (5 votes)

—————————-

[Rotations of a number] http://mathematica.stackexchange.com/questions/128666/rotations-of-a-number

If we start with a number like 1234 and produce the following sum 1234 + 123 + 12 + 1 = 1370.

If we are given the 1370 can I retrieve the 1234? A similar question was migrated over to the Math.SE ...

- asked by bobbym (8 votes), answered by J. M. (6 votes)

—————————-

[What's wrong with the Sum function?] http://mathematica.stackexchange.com/questions/128534/whats-wrong-with-the-sum-function

Here are the codes:

f[n_]:=Sum[1,{K,0,n},{M,0,n-K},{La,0,K},{Lb,0,n-K-M},{Lc,0,M}]//Simplify

g[n_]:=Sum[1,{La,0,n},{Lb,0,n-La},{Lc,0,n-La-Lb},{K,La,n-Lb},{M,Lc,n-K-Lb}]//Simplify

f[x]/.x->5

g[n_]:=Sum[1,{La,0,n},{Lb,0,n-La},{Lc,0,n-La-Lb},{K,La,n-Lb},{M,Lc,n-K-Lb}]//Simplify

f[x]/.x->5

...

- asked by lamberto (7 votes), answered by Bob Hanlon (3 votes)

[Creating legends for plots with multiple lines?] http://mathematica.stackexchange.com/questions/4025/creating-legends-for-plots-with-multiple-lines

So I have a graph with multiple lists, for e.g.

data = {{1,2}, {3,4}, {3,5}, {2,3} . . .}

If I then do ListLinePlot[Table[{#1,Log[b,#2]}&@@@data, {b,1,10,2}]] I have

no way to generate a legend ...

If I then do ListLinePlot[Table[{#1,Log[b,#2]}&@@@data, {b,1,10,2}]] I have

no way to generate a legend ...

- asked by Eiyrioü von Kauyf (59 votes), answered by Jens (88 votes)

—————————-

[Exporting graphics to PDF - huge file] http://mathematica.stackexchange.com/questions/1542/exporting-graphics-to-pdf-huge-file

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with

- asked by Matthew Leingang (85 votes), answered by Heike (74 votes)

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

[Parallelizing code, any tips?] http://mathematica.stackexchange.com/questions/128905/parallelizing-code-any-tips

I have access to a Linux cluster and I'm trying to use Parallelize to run the above bellow faster, but whenever I try to place Parallelize in any other parts, besides the loop, where I think it may ...

- asked by Sergio Parreiras (2 votes)

—————————-

[Does Reduce have problems with greek symbols that lead to wrong results?] http://mathematica.stackexchange.com/questions/128965/does-reduce-have-problems-with-greek-symbols-that-lead-to-wrong-results

I call Reduce on the following simple system of inequalities

e = ((-4 + Sqrt[(-2 + )^2] + 3 ) Log[p] + 4 Log[])/(2 );

Reduce[e > 0 && 1 > > 0 && 1 > p > 0 ...

Reduce[e > 0 && 1 > > 0 && 1 > p > 0 ...

- asked by klm (3 votes)

—————————-

[Full screen image in slideshow?] http://mathematica.stackexchange.com/questions/128875/full-screen-image-in-slideshow

Is it possible to make an image fill up and entire slide in a slideshow notebook so that there are no cell brackets or any white space around it at all (when viewed in presentation mode of course)?

- asked by M.R. (1 vote)

[How to programmatically play an Audio object?] http://mathematica.stackexchange.com/questions/128147/how-to-programmatically-play-an-audio-object

A Sound object can be programmatically played using EmitSound. Example:

What about an Audio object?

- asked by Szabolcs (14 votes), answered by Szabolcs (9 votes)

—————————-

[TreePlot does not give a ”binary-looking” tree for a binary tree] http://mathematica.stackexchange.com/questions/128323/treeplot-does-not-give-a-binary-looking-tree-for-a-binary-tree

I use the following code to generate a binary tree with root 1.

TreePlot[{1 -> 2, 1 -> 3, 2 -> 4, 2 -> 5, 3 -> 6, 3 -> 7, 4 -> 8,

4 -> 9, 5 -> 10, 5 -> 11, 6 -> ...

4 -> 9, 5 -> 10, 5 -> 11, 6 -> ...

- asked by Tony (13 votes), answered by WReach (19 votes)

—————————-

[Partition array without unpacking] http://mathematica.stackexchange.com/questions/128133/partition-array-without-unpacking

What is the simplest way to partition a list into equal-length sublists, allow the last sublist to be shorter of necessary, and avoid unpacking?

Partition doesn't usually unpack:

- asked by Szabolcs (13 votes), answered by Szabolcs (7 votes)

—————————-

[Creating a simple Dock Cell that Fades In when Cursor Hover Over It] http://mathematica.stackexchange.com/questions/128025/creating-a-simple-dock-cell-that-fades-in-when-cursor-hover-over-it

I like to create dock cells, that enhance the look of my notebooks. Do you know of a simple way to get the functionality in iBooks shown below in the video. I want the dock cell in Mathematica to ...

- asked by Michael McCain (13 votes), answered by Karsten 7. (14 votes)

—————————-

[Why are Exp[3] and 2 treated differently within Complex?] http://mathematica.stackexchange.com/questions/128211/why-are-exp3-and-2-treated-differently-within-complex

Why doesn't the last command below split the complex number into its real and imaginary parts?

- asked by Fernando Saldanha (12 votes), answered by Szabolcs (18 votes)

—————————-

[KeyDrop does not respect Key in V11] http://mathematica.stackexchange.com/questions/128171/keydrop-does-not-respect-key-in-v11

KeyDrop[<|a -> 1|>, Key[a]]

<|a -> 1|>

KeyTake[<|a -> 1|>, Key[a]]

<||>

<|a -> 1|>

KeyTake[<|a -> 1|>, Key[a]]

<||>

closely related but not the same: Unexpected behavior of KeyTake

Are there any ...

- asked by Kuba (11 votes), answered by Xavier (5 votes)

—————————-

[Strategies for creating 3D text] http://mathematica.stackexchange.com/questions/128412/strategies-for-creating-3d-text

I am interested in using Mathematica to create 3D text for printing. I stumbled upon this answer which works very well in a slightly modified form:

- asked by bobthechemist (10 votes), answered by J. M. (14 votes)

[Is it possible to export the equations from Mathematica to MATLAB?] http://mathematica.stackexchange.com/questions/14035/is-it-possible-to-export-the-equations-from-mathematica-to-matlab

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?

- asked by Seyhmus Güngören (24 votes), answered by R. M. (32 votes)

—————————-

[Labeling individual curves in Mathematica] http://mathematica.stackexchange.com/questions/4444/labeling-individual-curves-in-mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal experience, PlotLegends is pretty bad.

Is ...

- asked by Tianxiang Xiong (47 votes), answered by Artes (37 votes)

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

[Help: Reclassify] http://mathematica.stackexchange.com/questions/128194/help-reclassify

Is it possible to improve the current ClassifierFunction with more training data without running the previous training again?

In this way i will be able to deal with very large datasets in chunks.

- asked by user13892 (5 votes)

—————————-

[Pattern matching problem in version 11.01] http://mathematica.stackexchange.com/questions/128247/pattern-matching-problem-in-version-11-01

Consider this simple example:

p1 = ListPlot3D[

Table[Sin[j^2 + i], {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}],

Mesh -> None, Axes -> False, Boxed -> False, ColorFunction -> Hue];

p2 = ...

Table[Sin[j^2 + i], {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}],

Mesh -> None, Axes -> False, Boxed -> False, ColorFunction -> Hue];

p2 = ...

- asked by xslittlegrass (8 votes)

—————————-

[CUDADot runs slowly and writes ”CUDALink experienced a kernel launch failure” with matrix size ¿ 3300] http://mathematica.stackexchange.com/questions/128124/cudadot-runs-slowly-and-writes-cudalink-experienced-a-kernel-launch-failure-wi

I am trying to learn CUDA and start from the help examples.

It turnes out that CPU calculation is much faster for

matrix sizes < 3200 than CUDA, while CUDADot gives the error for sizes > 3300. I ...

It turnes out that CPU calculation is much faster for

matrix sizes < 3200 than CUDA, while CUDADot gives the error for sizes > 3300. I ...

- asked by luu (4 votes)

[UI performance with large image data] http://mathematica.stackexchange.com/questions/127523/ui-performance-with-large-image-data

Some days ago, I built a small program for some of my colleagues to analyse cell images. One minor part of the user interface was the selection of the region of interest. The images are large and need ...

- asked by halirutan (25 votes), answered by Kuba (21 votes)

—————————-

[Transform sphere to an ellipse in ] http://mathematica.stackexchange.com/questions/127645/transform-sphere-to-an-ellipse-in-r2

In Lay's Linear Algebra and Its Applications textbook, he defines the matrix

- asked by David (15 votes), answered by yarchik (17 votes)

—————————-

[Did Fibonacci slow down?] http://mathematica.stackexchange.com/questions/127876/did-fibonacci-slow-down

For Fibonacci numbers we have a nice formula:

We can implement that in Mathematica:

- asked by Fred Simons (13 votes), answered by Szabolcs (20 votes)

—————————-

[I would like to create a fractal by copying, scaling and rotating the initial element] http://mathematica.stackexchange.com/questions/127458/i-would-like-to-create-a-fractal-by-copying-scaling-and-rotating-the-initial-el

I want to create a fractal, which looks like this:

This is rule 150R, which can be found in NKS, page 439.

However, instead of using a cellular automaton, I want to create this fractal from a ...

- asked by Yuriy S (13 votes), answered by wxffles (13 votes)

—————————-

[Mathematica + Pythonika on the Raspberry pi] http://mathematica.stackexchange.com/questions/127802/mathematica-pythonika-on-the-raspberry-pi

Due to the high availability of python code for the rpi, I'm trying to call python functions from Mathematica. I know that pythonika works well on OS X, but I can't compile it on the Raspberry pi.

...

- asked by elbOlita (12 votes), answered by elbOlita (13 votes)

—————————-

[How to map and sum a list fast?] http://mathematica.stackexchange.com/questions/127658/how-to-map-and-sum-a-list-fast

The following takes a lot of memory and is slow:

I suspect this is because it first calculates and stores the whole list of squared numbers and ...

- asked by Yrogirg (12 votes), answered by BlacKow (19 votes)

—————————-

[Implementing the Biham–Middleton–Levine traffic model as CellularAutomaton] http://mathematica.stackexchange.com/questions/127821/implementing-the-biham-middleton-levine-traffic-model-as-cellularautomaton

In an attempt to understand how to make rules for CellularAutomaton[], I set out to try to implement the Biham–Middleton–Levine traffic model.

It is a 2D, k=3 model with a 3x3 neighborhood, so the ...

- asked by HJensen (10 votes), answered by C. E. (5 votes)

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by Dr. belisarius (341 votes), answered by Michael E2 (197 votes)

—————————-

[How to make this beautiful animation] http://mathematica.stackexchange.com/questions/112700/how-to-make-this-beautiful-animation

How to make an animation of following gif in Mathematica?

Edit: The animation shown above was created by Charlie Deck in processing.

And how to make 3D analog?

I tried first few steps

line = ...

- asked by vito (47 votes), answered by C. E. (50 votes)

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

[VectorPlot3D broken in Mathematica 11.0.1?] http://mathematica.stackexchange.com/questions/127724/vectorplot3d-broken-in-mathematica-11-0-1

Here is what I get when simply evaluating the example in the documentation:

This is on Win7 x64. I can see some vectors if I do something like

- asked by Pirx (5 votes)

—————————-

[Least squares approximation] http://mathematica.stackexchange.com/questions/127806/least-squares-approximation

I have data points which is mydata = 0, 0, 1, 1, 2, 0;

From this data, I need to do the least squares approximation by using Bernstein polynomials to produce a set of Bezier points. Before ...

- asked by NKamaru (2 votes)

—————————-

[Matching key-value pair without converting to List in KeyValueMap] http://mathematica.stackexchange.com/questions/127860/matching-key-value-pair-without-converting-to-list-in-keyvaluemap

I frequently use this method with KeyValueMap in order to match and refer to named parts (ie, ”myKey”, ”myValue”)

EDIT: to refer to named parts in the function f without an external function ...

- asked by alancalvitti (1 vote)

[Should I always be using Module in functions unless I explicitly want global variables?] http://mathematica.stackexchange.com/questions/126877/should-i-always-be-using-module-in-functions-unless-i-explicitly-want-global-var

I define functions a ton. In the past, I've mostly just defined my functions like:

And I haven't run into too much trouble. If I wanted to be really ...

- asked by YungHummmma (15 votes), answered by WReach (18 votes)

—————————-

[Why this real integral yields imaginary results?] http://mathematica.stackexchange.com/questions/127301/why-this-real-integral-yields-imaginary-results

The above integral yields -1-4I/3 in Mathematica. Since the integrand is real (although divergent at some points), how does ...

- asked by Chong Wang (12 votes), answered by bbgodfrey (12 votes)

—————————-

[Would it be a good idea to use Failure and FailureQ in own code] http://mathematica.stackexchange.com/questions/126908/would-it-be-a-good-idea-to-use-failure-and-failureq-in-own-code

Since version 10 (at least 10.0.2 but I think 10.0.0) there is Failure and since version 10.2 there is also FailureQ. As often the documentation is somewhat vague and says ”Failure is generated by ...

- asked by Albert Retey (12 votes), answered by Leonid Shifrin (9 votes)

—————————-

[Display grayscale image as 3d plot] http://mathematica.stackexchange.com/questions/127210/display-grayscale-image-as-3d-plot

How to build 3d plot of grayscale image where x,y - pixel coordinates, z - pixel intensity?

I tried ListPlot3D[ImageData[image]], but ImageData gives just intensities. I suppose a possible solution ...

- asked by red1ynx (10 votes), answered by Kuba (11 votes)

—————————-

[Automatically draw ellipsoids around groups of select points] http://mathematica.stackexchange.com/questions/126899/automatically-draw-ellipsoids-around-groups-of-select-points

Suppose you have a ListPlot, and there are certain points you wish to emphasize belong to particular group. I would like to make a function that automatically draws an ellipsoid around a select group ...

- asked by SumNeuron (10 votes), answered by Szabolcs (11 votes)

—————————-

[Enter colors directly into notebook?] http://mathematica.stackexchange.com/questions/127245/enter-colors-directly-into-notebook

In Mathematica notebook interface, you can evaluate:

In[1]:= Black

and you get a colored squared representing the color. Then I can copy and paste this color square and use it as input, like so:

...

- asked by becko (9 votes), answered by WReach (10 votes)

—————————-

[Large Dataset query fails if column contains Missing] http://mathematica.stackexchange.com/questions/126851/large-dataset-query-fails-if-column-contains-missing

In version 11.0 (Win 8.1 Pro) a query on a large Dataset for a column that contains Missing fails most unceremoniously.

With

- asked by Edmund (9 votes), answered by JasonB (7 votes)

[Is there an open source implementation of Mathematica-the-language?] http://mathematica.stackexchange.com/questions/4454/is-there-an-open-source-implementation-of-mathematica-the-language

I've seen questions before such as ”What is the best open-source equivalent for Mathematica?”, but that specific question (and that line of inquiry in general) cares more about the computer algebra ...

- asked by sblom (81 votes), answered by Simon (63 votes)

—————————-

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by Dr. belisarius (341 votes), answered by Michael E2 (195 votes)

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

[Enable file completion by default?] http://mathematica.stackexchange.com/questions/127203/enable-file-completion-by-default

Is there some way to enable this?

- asked by M.R. (2 votes)

—————————-

[Trouble with NIntegrate strategy ”DoubleExponentialOscillatory” when trying to ListPlot the results] http://mathematica.stackexchange.com/questions/126832/trouble-with-nintegrate-strategy-doubleexponentialoscillatory-when-trying-to-l

Can someone point me in the right direction? I 've been puzzling with this for weeks...

I have a huge function (of the form f(y,)sin(x) ) to integrate in in region (0, Infinity) and I use ...

- asked by George13 (1 vote)

—————————-

[Using an umlaut for a keyboard shortcut] http://mathematica.stackexchange.com/questions/126909/using-an-umlaut-for-a-keyboard-shortcut

How can I define a keyboard shortcut based on an umlaut like ü?

KeyEvent in KeyEventTranslations.tr doesn't seem to register umlaut based keyboard inputs. For example, after adding

...

- asked by Karsten 7. (3 votes)

[The paradigm behind Dynamic and related functionality] http://mathematica.stackexchange.com/questions/126471/the-paradigm-behind-dynamic-and-related-functionality

Dynamic and the related functionality strikes me as a very unique way to build quick and dirty personal GUIs which are great for experimentation.

I suspect that this is only because of my lack of ...

- asked by Szabolcs (24 votes), answered by Leonid Shifrin (21 votes)

—————————-

[Bug with iterated With: Referring to function arguments invalidates previous definitions] http://mathematica.stackexchange.com/questions/126425/bug-with-iterated-with-referring-to-function-arguments-invalidates-previous-def

I would expect both to behave exactly the same.

It seems that referring to the parameter ...

- asked by masterxilo (20 votes), answered by Kuba (20 votes)

—————————-

[How to quickly find all grid cells covered by a geometric region?] http://mathematica.stackexchange.com/questions/126346/how-to-quickly-find-all-grid-cells-covered-by-a-geometric-region

I'm trying to compute a complete set of unit grid cells (”pixels”) which a geometric region covers at least partially. I have constructed a method that produces correct results:

- asked by kirma (14 votes), answered by george2079 (9 votes)

—————————-

[Cone Trees: map a graph onto geometric shape] http://mathematica.stackexchange.com/questions/126657/cone-trees-map-a-graph-onto-geometric-shape

Question

Is it possible to map a Graph onto a geometric object such as a Cone?

Motivation

Visualizing large trees can be tedious, especially when limited to the confines of the printed page. One ...

- asked by SumNeuron (13 votes), answered by Szabolcs (18 votes)

—————————-

[Evaluate expressions within Vim] http://mathematica.stackexchange.com/questions/126449/evaluate-expressions-within-vim

I want to be able to type a quick Mathematica expression, such as

550/3. (e.g. common math),

Sum[i, {i, 0, n}]//TeXForm//ToString (e.g. writing LaTeX document), or

{55, 1, 10, 40, 9}//Total (e.g. ...

Sum[i, {i, 0, n}]//TeXForm//ToString (e.g. writing LaTeX document), or

{55, 1, 10, 40, 9}//Total (e.g. ...

- asked by Andrew MacFie (11 votes), answered by Andrew MacFie (11 votes)

—————————-

[Non newtonian calculus] http://mathematica.stackexchange.com/questions/126730/non-newtonian-calculus

I would like to define a new operator say

I think it must be done with an upvalue but I do not know how to ...

- asked by cyrille.piatecki (10 votes), answered by Szabolcs (18 votes)

—————————-

[How could I perform Region or Polygon Clipping in mathematica?] http://mathematica.stackexchange.com/questions/126463/how-could-i-perform-region-or-polygon-clipping-in-mathematica

I need to clip several regions reg: like Rectangle, Polygon, Ellipse... My goal isn't to plot the clipping but to have a representation of each new region.

I searched if there was any package or ...

- asked by A.M. (10 votes), answered by george2079 (4 votes)

[Beautiful dance of the Earth and Venus around the sun] http://mathematica.stackexchange.com/questions/115358/beautiful-dance-of-the-earth-and-venus-around-the-sun

I have seen very nice dynamic graphics created by users of Ma. I would like to get help whether the following graphics can be created using Ma. I was not able to create the dynamic picture here. ...

- asked by ramesh (12 votes), answered by ubpdqn (6 votes)

—————————-

[How can this image (optical illusion) be created with Mathematica?] http://mathematica.stackexchange.com/questions/24148/how-can-this-image-optical-illusion-be-created-with-mathematica

I came across this image the other day:

and liked the sensation of it pulsing. I was wondering if anyone would know how to create something similar with Mathematica (without the Pink Floyd Dark ...

- asked by Mike Honeychurch (53 votes), answered by halirutan (66 votes)

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

[Smart Subscript] http://mathematica.stackexchange.com/questions/126736/smart-subscript

I have a question about subscript policy. For some reason I have some variables called Subscript[q, 1], Subscript[q, 2], Subscript[q, 3] and Subscript[q, 4]. I know that I could have called them in ...

- asked by MaPo (1 vote)

—————————-

[Difficult R installation] http://mathematica.stackexchange.com/questions/126501/difficult-r-installation

In RLink and R v3.0.1?, there is an update which say that the problem of the lack of compatibility between the expected version and the last version of R has been settled for version 10.0.1 of ...

- asked by cyrille.piatecki (2 votes)

—————————-

[Does Overflow[] poison session for N?] http://mathematica.stackexchange.com/questions/126337/does-overflow-poison-session-for-n

Summary: once Mathematica hits an overflow error, N[] appears to break for even simple calculations.

I was impressed that Mathematica ran the code above (first 100 ...

- asked by barrycarter (9 votes)

[Drawing picture with straight line (Petros Vrellis's Art)] http://mathematica.stackexchange.com/questions/126161/drawing-picture-with-straight-line-petros-vrelliss-art

I am trying to extend Writing a word with straight lines for any picture/image. I guess the basic idea is to find a set of points in the image region and then draw random lines through them. Let's ...

- asked by Sumit (16 votes), answered by Rahul (6 votes)

—————————-

[How do I count the most used functions across a set of notebooks?] http://mathematica.stackexchange.com/questions/125960/how-do-i-count-the-most-used-functions-across-a-set-of-notebooks

WolframLanguageData allows us to view the most used functions across several code bases like Wolfram Alpha, the documentation, or Stack Exchange. I was curious about the results for my own collection ...

- asked by Michael Hale (15 votes), answered by Michael Hale (11 votes)

—————————-

[How to ReplaceAll except within specified heads] http://mathematica.stackexchange.com/questions/125918/how-to-replaceall-except-within-specified-heads

ReplaceAll[expr, rule] and ReplaceRepeated[expr, rule] search through all subexpressions of expr applying rule where they match.

Are there built-in Mathematica functions that do the same thing, ...

- asked by QuantumDot (15 votes), answered by JHM (15 votes)

—————————-

[Is this a bug in Replace?] http://mathematica.stackexchange.com/questions/125771/is-this-a-bug-in-replace

Consider the following minimal examples. This one works as expected, replacing trees starting from the inside with a numerical value.

- asked by István Zachar (14 votes), answered by Leonid Shifrin (17 votes)

—————————-

[How do I test if a variable represents a sequence?] http://mathematica.stackexchange.com/questions/126193/how-do-i-test-if-a-variable-represents-a-sequence

I created a variable that represents a sequence:

mySeq = Sequence[1, 2, 3];

I wanted to use that variable as an argument for some functions. But I got in trouble. For example,

FreeQ[mySeq, 1]

...

- asked by Fernando Saldanha (12 votes), answered by Edmund (8 votes)

—————————-

[How to calculate the numerical integral more efficiently?] http://mathematica.stackexchange.com/questions/126001/how-to-calculate-the-numerical-integral-more-efficiently

Rencently, I ecountered the following numerical intergral:

\begin{cases}

\mathbf I_1=\displaystyle \int_{t}\mathbf N' {\mathbf N'}^{\text T}{\rm d}t\\

\mathbf I_2=\displaystyle \int_{t}\mathbf N''

\mathbf I_1=\displaystyle \int_{t}\mathbf N' {\mathbf N'}^{\text T}{\rm d}t\\

\mathbf I_2=\displaystyle \int_{t}\mathbf N''

- asked by Shutao Tang (11 votes), answered by Anton Antonov (8 votes)

—————————-

[Optional argument that can be completely omitted?] http://mathematica.stackexchange.com/questions/125929/optional-argument-that-can-be-completely-omitted

I am writing a simple function return similar words.

I want to add another argument n which is optional. When it presents, it ...

- asked by matheorem (11 votes), answered by Szabolcs (12 votes)

[Writing a word with straight lines] http://mathematica.stackexchange.com/questions/113403/writing-a-word-with-straight-lines

Here is an interesting way to write a word: (it is from a poster for the International Museum Day 2006; I believe it even won an award at an international design competition)

by Boris Ljubicic. ...

- asked by VividD (71 votes), answered by Anton Antonov (32 votes)

—————————-

- asked by Matthew Leingang (85 votes), answered by Heike (73 votes)

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

[Finding covariation between datasets] http://mathematica.stackexchange.com/questions/125963/finding-covariation-between-datasets

For me this is a very fascinating problem, which I however lack the ability to deal with as well as the nomenclature to describe properly. (Please feel free to edit the title).

The conditions are the ...

- asked by MathLind (2 votes)

—————————-

[Wolfram math on windows using PBSPro cluster] http://mathematica.stackexchange.com/questions/125861/wolfram-math-on-windows-using-pbspro-cluster

A user wishes to use math application running on our PBSPpro cluster.

Our cluster is accessible to linux users, running qsub to submit their jobs.

We have math10.4 for our cluster users, with ...

- asked by Dvory (2 votes)

—————————-

[Unexpected view of a vectorial triad in a combination of a Plot3D with Graphics3D] http://mathematica.stackexchange.com/questions/126168/unexpected-view-of-a-vectorial-triad-in-a-combination-of-a-plot3d-with-graphics3

I am preparing an illustration for the lecture on differential geometry. In this demonstration I am illustrating the Monge parameterization of the surface:

- asked by Alexei Boulbitch (2 votes)

[The Game of Hex in Mathematica] http://mathematica.stackexchange.com/questions/125460/the-game-of-hex-in-mathematica

The Game of Hex is a game originally developed by Nash, and it's rules are very simple. You start out with a hexagonal tiling of some size:

There are two players. The game is in turns, and every ...

- asked by TreFox (31 votes), answered by C. E. (26 votes)

—————————-

[Visualize fraction] http://mathematica.stackexchange.com/questions/125209/visualize-fraction

I would like to visualize a fraction like the square root of 2 with Mathematica. I found this visualization of Pi in the internet and wonder how this would be done with Mathematica. The image shows ...

- asked by Arjihad (22 votes), answered by Kuba (20 votes)

—————————-

[Monad-like structures in Mathematica] http://mathematica.stackexchange.com/questions/125537/monad-like-structures-in-mathematica

I have been trying to code monad-like structures in Mathematica. However, I am facing some issues and I was wondering if anyone can help. I will give some background in the hope it can be useful to ...

- asked by Diogo Gomes (16 votes), answered by m_goldberg (6 votes)

—————————-

[paclets updating awareness and tracking] http://mathematica.stackexchange.com/questions/125199/paclets-updating-awareness-and-tracking

It turns out that some silent updating may be done in our computers with paclets. See for example here. How are we aware that something has been changed ? Can we track updating/versions of paclets ?

...

- asked by andre (16 votes)

—————————-

[Is it important that the front-end has a built-in parser?] http://mathematica.stackexchange.com/questions/125180/is-it-important-that-the-front-end-has-a-built-in-parser

The Notebook interface has a parser that seems aware of all operator-precedences, allowing us to step through the expressions (rather: Box-) hierarchy with Ctrl+.

This is extremely convenient, saving ...

- asked by masterxilo (15 votes), answered by John Fultz (18 votes)

—————————-

[Package organization] http://mathematica.stackexchange.com/questions/125579/package-organization

When writing a Mathematica package Foo, with functions f1, f2 and f3, one can use the template:

- asked by Pixor (14 votes), answered by Szabolcs (17 votes)

—————————-

[ClearAll::clloc - ”Cannot clear local variable x” in Block[x, ...] - why?] http://mathematica.stackexchange.com/questions/125251/clearallclloc-cannot-clear-local-variable-x-in-blockx-why

The documentation just says

An error occurs because ClearAll cannot be used with a local variable in Block:

and

...

- asked by masterxilo (14 votes)

[Beautiful dance of the Earth and Venus around the sun] http://mathematica.stackexchange.com/questions/115358/beautiful-dance-of-the-earth-and-venus-around-the-sun

I have seen very nice dynamic graphics created by users of Ma. I would like to get help whether the following graphics can be created using Ma. I was not able to create the dynamic picture here. ...

- asked by ramesh (11 votes), answered by ubpdqn (6 votes)

—————————-

[How can I draw the Olympic rings with Mathematica?] http://mathematica.stackexchange.com/questions/8885/how-can-i-draw-the-olympic-rings-with-mathematica

How can I draw the 5 interlocking Olympic rings with Mathematica?

(SVG version)

Edit

Hard choice, but some pretty cool answers here. I didn't have 3D answers in mind when I posted the question, ...

- asked by Mike Honeychurch (41 votes), answered by cormullion (18 votes)

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

[Creating notebooks with specific options being editable but not saveable] http://mathematica.stackexchange.com/questions/125676/creating-notebooks-with-specific-options-being-editable-but-not-saveable

The goal

is to create a notebook whose options, when the notebook is opened, are fixed regardless of edits done to the notebook.

- asked by Kuba (8 votes)

—————————-

[Possible bug with Dataset formatting for incompatible shapes and Missing] http://mathematica.stackexchange.com/questions/125689/possible-bug-with-dataset-formatting-for-incompatible-shapes-and-missing

Bug introduced in 11.0.0

The problem:

More detailed example shows that 5 is the magic number and ...

- asked by Kuba (10 votes)

—————————-

[TensorContract applied twice] http://mathematica.stackexchange.com/questions/125588/tensorcontract-applied-twice

I have a very simple question about TensorContract command: I'm declaring

$Assumptions = {T \[Element] Arrays[{4, 4, 4, 4}], a \[Element] Arrays[{4, 4}], b \[Element] Arrays[{4, 4}]};

so T is a ...

- asked by MaPo (3 votes)

[How to make a Spherical Cow?] http://mathematica.stackexchange.com/questions/125043/how-to-make-a-spherical-cow

Being a theoretical physicist, I always have a great respect for Spherical Cow. So I thought about making one myself. I am not sure how can I create (something considered to be the simplest!) this ...

- asked by Sumit (29 votes), answered by andre (41 votes)

—————————-

[Unit Discovery: Is this some sort of a sick joke?] http://mathematica.stackexchange.com/questions/124745/unit-discovery-is-this-some-sort-of-a-sick-joke

Alright, let's have some fun here. I am essentially following the documentation by Wolfram, just looking at different quantities.

Hmm, ...

- asked by Pirx (26 votes), answered by Xavier (27 votes)

—————————-

[Remove noise from data] http://mathematica.stackexchange.com/questions/124928/remove-noise-from-data

Hi, as you can see above I have some experimental data which has a large offset and shows clear noise fluctations around the tendency of the curve. I wanted to ask if someone could suggest me a ...

- asked by Filipe (23 votes), answered by nikie (22 votes)

—————————-

[Q&A Mathematica v.11 Neural Networks: A comprehensive look at Layers, Net Functions, and pioneering into this [[experimental]] code] http://mathematica.stackexchange.com/questions/124977/qa-mathematica-v-11-neural-networks-a-comprehensive-look-at-layers-net-functi

Motivation

As Mathematica v.11 was released earlier this month with a host of new [[experimental]] functions and a limited number of examples on curated data that do not cover all layers, options, ...

- asked by SumNeuron (20 votes), answered by Sebastian (12 votes)

—————————-

[Custom OpenerView with lazy evaluation] http://mathematica.stackexchange.com/questions/124892/custom-openerview-with-lazy-evaluation

OpenerView can be nested to create a hierarchical structure such as this:

One great aspect is that it remembers which lists are open and which are closed even after the parent has been closed and ...

- asked by C. E. (16 votes), answered by C. E. (7 votes)

—————————-

[RNN in Mathematica?] http://mathematica.stackexchange.com/questions/124988/rnn-in-mathematica

Recurrent neural network is an important part of machine learning and its improved version: LSTM network is widely applied, but Mathematica seemingly is in lack of these two features and in my ...

- asked by Wjx (15 votes), answered by Taliesin Beynon (19 votes)

—————————-

[Pentagonal spiral in Mathematica] http://mathematica.stackexchange.com/questions/125007/pentagonal-spiral-in-mathematica

I would like to plot an image of what I call a pentagonal spiral with Mathematica. A sample image of what I'd like to obtain is this (sorry for low-quality):

My initial idea was to get some kind of ...

- asked by bharb (14 votes), answered by Wjx (11 votes)

[Labeling individual curves in Mathematica] http://mathematica.stackexchange.com/questions/4444/labeling-individual-curves-in-mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal experience, PlotLegends is pretty bad.

Is ...

- asked by Tianxiang Xiong (44 votes), answered by Artes (37 votes)

—————————-

[How to make this beautiful animation] http://mathematica.stackexchange.com/questions/112700/how-to-make-this-beautiful-animation

How to make an animation of following gif in Mathematica?

Edit: The animation shown above was created by Charlie Deck in processing.

And how to make 3D analog?

I tried first few steps

line = ...

- asked by vito (45 votes), answered by C. E. (48 votes)

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

[WolframScript never exits (v11 only)] http://mathematica.stackexchange.com/questions/124667/wolframscript-never-exits-v11-only

after updating to version 11, I came across a problem with the execution of package files via bash.

The WolframScript program runs the entire code, but frequently it does not exit properly and as a ...

- asked by fabio.hipolito (5 votes)

—————————-

[Representing inequalties with proper boundaries] http://mathematica.stackexchange.com/questions/124747/representing-inequalties-with-proper-boundaries

I have a very simple problem: given an inequality, I'd like to represent it in a regional plot marking the boundary differently depending whether it belongs to the region or not. For example I'd like ...

- asked by Geon (3 votes)

—————————-

[StringTemplate performance issue] http://mathematica.stackexchange.com/questions/125087/stringtemplate-performance-issue

StringTemplate introduced in version 10 is very convenient in constructing formatted data. However, it seems to have a huge performance issue.

Consider this example:

data = RandomInteger[1, 100, ...

- asked by xslittlegrass (5 votes)

[GeoPosition coordinates from Shape file (.SHP) with unknown Datum] http://mathematica.stackexchange.com/questions/124121/geoposition-coordinates-from-shape-file-shp-with-unknown-datum

The City of Amsterdam supports an Open Data policy. Much information can be retrieved at the level of boroughs (stadsdelen). Unfortunately, GeoGraphics does not provide outlines of these smaller ...

- asked by Romke Bontekoe (12 votes), answered by JasonB (8 votes)

—————————-

[Detecting collisions in FEM] http://mathematica.stackexchange.com/questions/124324/detecting-collisions-in-fem

Say I want to study the deformation of a pitchfork when you have it fixed on the bottom and push one side.

- asked by tsuresuregusa (12 votes)

—————————-

[Discovering crosswords] http://mathematica.stackexchange.com/questions/124552/discovering-crosswords

I am trying to create a code that can identify the following terms: MATHEMATICA, STACK, EXCHANGE and USERS.

- asked by Leandro Maciel de Carvalho (11 votes), answered by C. E. (15 votes)

—————————-

[29 Differential equations hang/not solved in version 11 compared to 10.4, looking for cause] http://mathematica.stackexchange.com/questions/124573/29-differential-equations-hang-not-solved-in-version-11-compared-to-10-4-lookin

I run Kamke differential equations in version 11 and compared the result to version 10.4. Found 29 differential equations that are no longer solved in version 11. Actually v11 hangs on these, eating ...

- asked by Nasser (11 votes)

—————————-

[Using predefined expressions as free variables in a pure function] http://mathematica.stackexchange.com/questions/124530/using-predefined-expressions-as-free-variables-in-a-pure-function

I want to have a function value of an expression where some variables are solutions to some set of equations, with some values of parameters. I had an idea to use pure functions for that.

However, ...

- asked by Picek (10 votes), answered by Alexey Popkov (4 votes)

—————————-

[How to delete unnecessary resistances in a resistance network] http://mathematica.stackexchange.com/questions/124475/how-to-delete-unnecessary-resistances-in-a-resistance-network

I'm still dealing with resistance network processing and got one problem left: how to delete unnecessary resistances?

Background

Let's assume we are junior high students and know nothing about ...

- asked by Wjx (10 votes), answered by Sascha (5 votes)

—————————-

[Object detection in a low contrast image] http://mathematica.stackexchange.com/questions/124060/object-detection-in-a-low-contrast-image

I have a small dark object in the upper left corner of an image.

How can I separate it from the noisy rest and determine its IntensityCentroid?

The problem is that the objects intensity is not ...

- asked by mrz (10 votes), answered by Svyatoslav Korneev (12 votes)

[Make a beautiful Moiré effect] http://mathematica.stackexchange.com/questions/112998/make-a-beautiful-moir%c3%a9-effect

How do I make the following Moiré pattern?

I tried:

A = Plot[Table[n, {n, 1, 30}], {x, 0, 31},

GridLines -> {Table[n, {n, 1, 30}], None},

GridLinesStyle -> AbsoluteThickness[1.2], ...

GridLines -> {Table[n, {n, 1, 30}], None},

GridLinesStyle -> AbsoluteThickness[1.2], ...

- asked by vito (23 votes), answered by gpap (34 votes)

—————————-

[Beautiful dance of the Earth and Venus around the sun] http://mathematica.stackexchange.com/questions/115358/beautiful-dance-of-the-earth-and-venus-around-the-sun

I have seen very nice dynamic graphics created by users of Ma. I would like to get help whether the following graphics can be created using Ma. I was not able to create the dynamic picture here. ...

- asked by ramesh (11 votes), answered by ubpdqn (6 votes)

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

[CapForm bugged in V11?] http://mathematica.stackexchange.com/questions/124591/capform-bugged-in-v11

It appears on my system (OSX 10.10.5) that CapForm isn't behaving itself in V11. Initially I thought it was a problem with the combination of CapForm and VertexColors but it seems even weirder than ...

- asked by Quantum_Oli (6 votes)

—————————-

[Linear tangent steering law and orbital insertion altitude] http://mathematica.stackexchange.com/questions/124489/linear-tangent-steering-law-and-orbital-insertion-altitude

I've been trying to figure out how to build a rocket launch simulation that allows the user to specify the desired altitude at which a payload will be inserted into a stable circular orbit, but have ...

- asked by AlexR (2 votes)

—————————-

[What is a ”generic case”?] http://mathematica.stackexchange.com/questions/124347/what-is-a-generic-case

Introduction

With this question I am coming back to a long-standing issue I have with Mma's concept of a ”generically correct” result. The basic idea seems to be, vaguely, that if a result is true in ...

- asked by Pirx (6 votes)

[Can Mathematica put these puzzle pieces together?] http://mathematica.stackexchange.com/questions/123993/can-mathematica-put-these-puzzle-pieces-together

I have five DXF files with various geometric figures.

Are squares with a different geometric shape in each DXF file...

Four DXF files have a square with a different geometric shape on one side ...

- asked by Leandro Maciel de Carvalho (17 votes), answered by kirma (11 votes)

—————————-

[How to monitor the process of Neural Network Learning] http://mathematica.stackexchange.com/questions/123684/how-to-monitor-the-process-of-neural-network-learning

Main Problem

I'm exploring the neural network in v11 and I would like to monitor the training progress in my own way instead of Mathematica's default way. So my question is, how to do this ...

- asked by Wjx (17 votes), answered by Taliesin Beynon (13 votes)

—————————-

[Changes to Coefficient function in v10.2] http://mathematica.stackexchange.com/questions/123565/changes-to-coefficient-function-in-v10-2

In the version Mathemaica 10.4, I am very surprised that the core function Coefficient has changed, e.g.,

In previous versions (e.g. v9.0.1, ...

- asked by Orders (17 votes)

—————————-

[Unexpected behaviour from Table[]] http://mathematica.stackexchange.com/questions/124046/unexpected-behaviour-from-table

The following code in Mathematica 11:

Where in version 10 (and presumably earlier versions) it produced an error:

...

- asked by Bruce Crawford (16 votes), answered by Szabolcs (15 votes)

—————————-

[Can Mathematica act like a web server?] http://mathematica.stackexchange.com/questions/123805/can-mathematica-act-like-a-web-server

I have a Mathematica program that modifies images that I would like to make available for other people to use through the web. The input is only one parameter. So, for example, I could run it as a ...

- asked by Tyler Durden (16 votes)

—————————-

[How to generate all possible orderless partitions of a list according to another list?] http://mathematica.stackexchange.com/questions/123835/how-to-generate-all-possible-orderless-partitions-of-a-list-according-to-another

This question is hard to describe in plain text. So I will post an example and a working code (brute force) to illustrate.

- asked by happy fish (15 votes), answered by Mr.Wizard (11 votes)

—————————-

[RandomPoint crashes kernel] http://mathematica.stackexchange.com/questions/123735/randompoint-crashes-kernel

Bug introduced in Version 11.0

Reported as CASE:3686963, 12 Aug 2016

I attempted to determine whether the problem with RandomPoint identified in my answer to question 89384 had been fixed in

...

- asked by bbgodfrey (12 votes), answered by ilian (6 votes)

[How to Plot an Infinite Series] http://mathematica.stackexchange.com/questions/14083/how-to-plot-an-infinite-series

I want to sketch the graphs of

For , I input

- asked by Vladimir (2 votes), answered by chris (9 votes)

—————————-

[How to make this beautiful animation] http://mathematica.stackexchange.com/questions/112700/how-to-make-this-beautiful-animation

How to make an animation of following gif in Mathematica?

Edit: The animation shown above was created by Charlie Deck in processing.

And how to make 3D analog?

I tried first few steps

line = ...

- asked by vito (45 votes), answered by C. E. (48 votes)

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

[Holidays output] http://mathematica.stackexchange.com/questions/123763/holidays-output

I wanted to print out the holidays in Germany in 2016:

DayRange[DateObject[{2016, 1, 1}],

DateObject[{2016, 12, 31}], "Holiday",

HolidayCalendar -> {"Germany", "Bavaria"}]

DateObject[{2016, 12, 31}], "Holiday",

HolidayCalendar -> {"Germany", "Bavaria"}]

The result list ...

- asked by mrz (2 votes)

—————————-

[How to crawl some website needed username and password] http://mathematica.stackexchange.com/questions/123771/how-to-crawl-some-website-needed-username-and-password

In version 11,if we want to crawl public website like wiki,we can do it like this:

But I don't know how to crawl some website needed ...

- asked by yode (4 votes)

—————————-

[NFourierTransform of an interpolating function] http://mathematica.stackexchange.com/questions/123800/nfouriertransform-of-an-interpolating-function

I have an interpolating function called rs22 - a solution from NDSolve - which is defined from 0 to about 1 ms. rs22 is a function that reaches a non-zero equilibrium value. (only shown here up to ...

- asked by Shiki (3 votes)

[PostScript-like drawing in Mathematica?] http://mathematica.stackexchange.com/questions/123289/postscript-like-drawing-in-mathematica

To illustrate by example, construct an equilateral triangle in PostScript:

- asked by Alan (14 votes), answered by WReach (21 votes)

—————————-

[Efficiently exchange elements between two lists] http://mathematica.stackexchange.com/questions/123221/efficiently-exchange-elements-between-two-lists

I have two lists with equal length, and I want to exchange the elements on every even positions. For example,

- asked by happy fish (13 votes), answered by Kuba (12 votes)

—————————-

[Finite element simulation of Airy waves] http://mathematica.stackexchange.com/questions/122063/finite-element-simulation-of-airy-waves

I am attempting to solve for waves on a water surface starting with a two dimensional solution. The equations are that the water must satisfy Laplace's equation everywhere with a time dependent ...

- asked by Hugh (13 votes), answered by user21 (10 votes)

—————————-

[How do you make a Neural Net?] http://mathematica.stackexchange.com/questions/123458/how-do-you-make-a-neural-net

In the new Mathematica release (v11), NeuralNetworks is one of the new main features. However, the documentation isn't that clear on what function should be used in a Net.

The documentation on ...

- asked by JHM (12 votes), answered by Searke (13 votes)

—————————-

[How to plot data by counties?] http://mathematica.stackexchange.com/questions/123324/how-to-plot-data-by-counties

I'd like to plot county data as in this D3 example:

Is there a way to do this with GeoGraphics, or at least to get path polygons per county and then plot them with different colors?

The first ...

- asked by M.R. (11 votes), answered by C. E. (9 votes)

—————————-

[Why are delayed definitions in scoping functions NOT documented?] http://mathematica.stackexchange.com/questions/122061/why-are-delayed-definitions-in-scoping-functions-not-documented

As outlined here, := may be used in scoping constructs like With to give delayed definitions, but this is undocumented.

This has been in the language since at least Mathematica 4.0. It is very ...

- asked by Mr.Wizard (11 votes)

—————————-

[Shading under a curve with dots]http://mathematica.stackexchange.com/questions/123422/shading-under-a-curve-with-dots

I plotted the function using the Plot command

I need to shade the area under the curve using a pattern (dots pattern), not using a solid color or a hue. Is it possible? ...

- asked by James (10 votes), answered by JasonB (14 votes)

[General strategies to write big code in Mathematica?] http://mathematica.stackexchange.com/questions/109888/general-strategies-to-write-big-code-in-mathematica

I think after six months of exposure to Mathematica and the Wolfram Language I am fairly OK with writing short codes and snippets. However, what are some general strategies to use in order to write ...

- asked by Ali Hashmi (94 votes), answered by Leonid Shifrin (75 votes)

—————————-

[Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...

- asked by J. M. (430 votes), answered by faysou (388 votes)

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

[Can I use Mathematica as a constraint solver?] http://mathematica.stackexchange.com/questions/123487/can-i-use-mathematica-as-a-constraint-solver

I have been using SMT solvers for program analysis. Basically the idea is to translate x86 assembly code to SMT formulas and use the solver for automatic input test generation. There is a Microsoft ...

- asked by Edgar (1 vote)

—————————-

[Why is this function slower after a simple change?] http://mathematica.stackexchange.com/questions/122109/why-is-this-function-slower-after-a-simple-change

I have a function that calculates the rank of a restricted growth string defined like so,

- asked by Jordy Dickinson (3 votes)

—————————-

[Is there an efficient way to monitor the progress of a task remotely?] http://mathematica.stackexchange.com/questions/123181/is-there-an-efficient-way-to-monitor-the-progress-of-a-task-remotely

Recently, I've been running Mathematica packages on a remote cluster using SSH (using, e.g. the command

so that the output ...

- asked by Nikhil Anand (2 votes)

[How can I detect locations of Go (aka Baduk, Weiqi) stones on a board?] http://mathematica.stackexchange.com/questions/121835/how-can-i-detect-locations-of-go-aka-baduk-weiqi-stones-on-a-board

The Goal

There are a couple apps that score a Go board from a photo. I was wondering if something like that would be possible with Mathematica. The key step is to detect the positions of the stones ...

- asked by Mark S. (19 votes), answered by halirutan (2 votes)

—————————-

[What are all the ”magic” Symbols in the Mathematica language?] http://mathematica.stackexchange.com/questions/121981/what-are-all-the-magic-symbols-in-the-mathematica-language

Leonid Shifrin once wrote (excerpted):

(Unevaluated) is one of a very few ”magic symbols”, along with Sequence and Evaluate - these are deeply wired into the system and can not be easily ...

- asked by Mr.Wizard (16 votes), answered by Mr.Wizard (9 votes)

—————————-

[What has changed in pattern matching functions with the Orderless attribute?] http://mathematica.stackexchange.com/questions/121564/what-has-changed-in-pattern-matching-functions-with-the-orderless-attribute

In making an attempt to answer this question, we ran into a version-dependent pattern-matching issue. An extended discussion in the comments transpired, and some inconsistencies arose. Consider the ...

- asked by march (16 votes)

—————————-

[Converting a Sierpinski tetrahedron to a Graph] http://mathematica.stackexchange.com/questions/121553/converting-a-sierpinski-tetrahedron-to-a-graph

I need a representation of a 3D Sierpinski gasket as a graph to perform some simulations on. The 2D version is included in GraphData[], but the 3D one is nowhere to be found, so I was wondering if ...

- asked by FEARxxx (13 votes), answered by J. M. (2 votes)

—————————-

[Working with DynamicModule: SetDelayed + OwnValues] http://mathematica.stackexchange.com/questions/121584/working-with-dynamicmodule-setdelayed-ownvalues

Shortly, definitions in form of e.g. x:= RandomReal[] have to be avoided

inside DynamicModule[{x}, ...]. Why?, this Prints immediately:

DynamicModule[{x}, x := Print[1]; {}]

inside DynamicModule[{x}, ...]. Why?, this Prints immediately:

DynamicModule[{x}, x := Print[1]; {}]

It hit us hard in the ...

- asked by Kuba (12 votes), answered by Kuba (13 votes)

—————————-

[How to speed up pattern matching] http://mathematica.stackexchange.com/questions/121911/how-to-speed-up-pattern-matching

Main Problem

Mr.Wizard posed this question when discussing another problem.

I reproduce the main part of Mr.Wizard's problem here:

On ...

- asked by Wjx (11 votes), answered by Michael E2 (5 votes)

—————————-

[How to efficiently implement k-FN (k-Furthest Neighbors)?] http://mathematica.stackexchange.com/questions/121541/how-to-efficiently-implement-k-fn-k-furthest-neighbors

I'd like to pick k points from a set of points in n-dimensions that are approximately ”maximally apart” (sum of pairwise distances is almost maxed). What is an efficient way to do this in MMA? Using ...

- asked by M.R. (10 votes), answered by C. Woods (2 votes)

[Writing a word with straight lines] http://mathematica.stackexchange.com/questions/113403/writing-a-word-with-straight-lines

Here is an interesting way to write a word: (it is from a poster for the International Museum Day 2006; I believe it even won an award at an international design competition)

by Boris Ljubicic. ...

- asked by VividD (70 votes), answered by Anton Antonov (32 votes)

—————————-

[Make a beautiful Moiré effect] http://mathematica.stackexchange.com/questions/112998/make-a-beautiful-moir%c3%a9-effect

How do I make the following Moiré pattern?

I tried:

A = Plot[Table[n, {n, 1, 30}], {x, 0, 31},

GridLines -> {Table[n, {n, 1, 30}], None},

GridLinesStyle -> AbsoluteThickness[1.2], ...

GridLines -> {Table[n, {n, 1, 30}], None},

GridLinesStyle -> AbsoluteThickness[1.2], ...

- asked by vito (23 votes), answered by gpap (34 votes)

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

[Looking for a package for finite mappings] http://mathematica.stackexchange.com/questions/121776/looking-for-a-package-for-finite-mappings

I am looking for a package for dealing with ”mappings” where and are finite subsets of the set of all possible (inert) expressions.

I need operations like:

Computing ...

- asked by masterxilo (3 votes)

—————————-

[Using Palettes in Mathematica Online] http://mathematica.stackexchange.com/questions/121935/using-palettes-in-mathematica-online

my student is using the online version of Mathematica for my class; it appears to not have a palette feature for typing formatted input? This was kind of shocking to me; why wouldn't there be a ...

- asked by Jake Mirra (1 vote)

—————————-

[Derivation of an interpolation function with multiple arguments] http://mathematica.stackexchange.com/questions/121599/derivation-of-an-interpolation-function-with-multiple-arguments

I have the following interpolation function:

f[x_,a_,b_]:=70 s[a,b][[1,1,2]][x]

where s[a,b] is the solution of a differential equation.

s[a_, b_] := NDSolve[{

H2[x] == Rx[x]^2 + G[x, a, b],

...

where s[a,b] is the solution of a differential equation.

s[a_, b_] := NDSolve[{

H2[x] == Rx[x]^2 + G[x, a, b],

...

- asked by Maria (2 votes)

[Generate a certain colorful triangle] http://mathematica.stackexchange.com/questions/121353/generate-a-certain-colorful-triangle

I want to get a colorful triangle like this:

I hope to get a triangle with any number of layers. This is my current method. Actually, I'm not very content with these graph theory functions, since ...

- asked by yode (13 votes), answered by Mr.Wizard (7 votes)

—————————-

[Bad interaction between Join and ListPlot (or Plot)] http://mathematica.stackexchange.com/questions/121289/bad-interaction-between-join-and-listplot-or-plot

When you write this code:

tab = {{1, 1}}; tab = Join[tab, {{2,2}}];

you expect to get the following table:

{{1, 1}, {2, 2}}

but, if you write the following code instead:

tab = {{1, 1}}; tab = ...

you expect to get the following table:

{{1, 1}, {2, 2}}

but, if you write the following code instead:

tab = {{1, 1}}; tab = ...

- asked by Francisco (11 votes), answered by C. E. (8 votes)

—————————-

[Handwriting recognition with Mathematica] http://mathematica.stackexchange.com/questions/121051/handwriting-recognition-with-mathematica

I am trying to teach Mathematica to read my handwriting. Since I don't want to ruin my reputation by showing my own handwriting, I am going to use a font called blackjack.

Lets say this is a ...

- asked by Sumit (11 votes)

—————————-

[Can one effectively edit a Front End Resource that is already loaded?] http://mathematica.stackexchange.com/questions/121059/can-one-effectively-edit-a-front-end-resource-that-is-already-loaded

A number of special definitions are loaded from .tr files on Front End initialization and are accessible via FrontEndResource. These are used among other things for various menus and toolsbars, e.g.:

- asked by Mr.Wizard (11 votes)

—————————- [Bug with Compile and Log2?] http://mathematica.stackexchange.com/questions/121336/bug-with-compile-and-log2

It seems that Log2 in Compile gives numerical errors (CompiledFunction::cfn) if the input is not a power of 2.

For instance:

gives an error ...

- asked by JHM (10 votes), answered by Michael E2 (4 votes)

—————————-

[What is the effect of giving ColorFunctionScaling a numerical argument?] http://mathematica.stackexchange.com/questions/121231/what-is-the-effect-of-giving-colorfunctionscaling-a-numerical-argument

(by making a mistake) I realised that ColorFunctionScaling can take a list of numerical arguments rather than just booleans. The following is true for ContourPlot and DensityPlot but not Plot3D and ...

- asked by gpap (10 votes), answered by Mr.Wizard (4 votes)

—————————-

[Reproducing the xkcd ”Self-Description” comic] http://mathematica.stackexchange.com/questions/121160/reproducing-the-xkcd-self-description-comic

Trying to brush up on my programming, I wanted to see if I can reproduce at least the first two panels of the following comic in Mathematica:

I have some code for trying to reproduce the first ...

- asked by Mayumi It

(10 votes), answered by Alexey Popkov (7 votes)

- asked by Matthew Leingang (84 votes), answered by Heike (71 votes)

—————————-

[Calculate the 2D Fourier transform of an Image] http://mathematica.stackexchange.com/questions/29203/calculate-the-2d-fourier-transform-of-an-image

I am new to Mathematica, and using version 8.0.

I would like to calculate the 2D Fourier Transform of an Image with Mathematica and plot the magnitude and phase spectrum, as well as reconstruct the ...

- asked by user8727 (2 votes), answered by Nasser (22 votes)

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

[single slit diffraction numerical simulation] http://mathematica.stackexchange.com/questions/121474/single-slit-diffraction-numerical-simulation

I'm trying to simulate the Fraunhoffer diffraction at slits(single,double,triple) with Mathematica.

In the picture, the red one is analytical result and the green one is numerical result.

The ...

- asked by Taeshin Kim (5 votes)

—————————-

[How does the Contours-¿f_1, g1, f_2, g_2,... setting work?] http://mathematica.stackexchange.com/questions/121205/how-does-the-contours%e2%86%92f-1-g1-f-2-g-2-setting-work

I want to plot some wavefronts in Mathematica, and I'm having some trouble reining in one of the options for my ContourPlot3D.

More specifically, the documentation for ContourPlot3D says that the ...

- asked by Emilio Pisanty (5 votes)

—————————-

[Is every menu command equivalent to a command that can be executed within a notebook?] http://mathematica.stackexchange.com/questions/121453/is-every-menu-command-equivalent-to-a-command-that-can-be-executed-within-a-note

If so, is there a directory which gives the in-notebook command associated with each menu command ?

In particular, I would like to know how to replicate the

menu command Evaluation -> Quit Kernel -> ...

menu command Evaluation -> Quit Kernel -> ...

- asked by Simon (3 votes)

[How can I better mimic the graphics at earth.nullschool.net?] http://mathematica.stackexchange.com/questions/120842/how-can-i-better-mimic-the-graphics-at-earth-nullschool-net

I'd like to be able to better mimic the graphics at earth.nullschool.net using Mathematica and I'm looking for suggestions for either improving my code or getting directed to some other approach.

...

- asked by Jim Baldwin (14 votes), answered by Simon Woods (15 votes)

—————————-

[how to permute list of number1,2,3,...,n,while preserve the order of first m terms as well as the last n-m terms?] http://mathematica.stackexchange.com/questions/120690/how-to-permute-list-of-number1-2-3-n-while-preserve-the-order-of-first-m-t

For example, starting from 1,2,3,4, I want to generate all permutations like 1,3,2,4,1,3,4,2,3,4,1,2 which preserve the order of e.g first two terms 1,2 and the order of e.g. last two terms ...

- asked by user41614 (12 votes), answered by Kuba (8 votes)

—————————-

[Create a polynomial of a given degree] http://mathematica.stackexchange.com/questions/120841/create-a-polynomial-of-a-given-degree

In Mathematica, how can I create a polynomial function in given variables of a given degree with unknown coefficents?

That is, I am looking for a function Poly[vars, degree] that generates, for ...

- asked by Posch79 (11 votes), answered by march (6 votes)

—————————-

[Fractal basins of attraction in a Magnetic Pendulum] http://mathematica.stackexchange.com/questions/120946/fractal-basins-of-attraction-in-a-magnetic-pendulum

I am trying to write a Mathematica program that realizes a graphical approximation of the basins of attraction in a Magnetic pendulum subject to friction and gravity, in which the three magnets are ...

- asked by bharb (10 votes), answered by C. E. (9 votes)

—————————-

[Draw half empty rectangle] http://mathematica.stackexchange.com/questions/120781/draw-half-empty-rectangle

How can I draw an half or a third filled rectangle? I want to make one rectangle frame with a unity width and then filled it according to a value between 0 and 1.

- asked by Miguel (9 votes), answered by Feyre (9 votes)

—————————-

[How to access ”Choose Color Scheme” Programmatically] http://mathematica.stackexchange.com/questions/120999/how-to-access-choose-color-scheme-programmatically

I am designing an App and I want to use the ”Choose Color Scheme” tools inside Button.

I am looking to have this tool in popup window when the Button is clicked but I can't find the command to get ...

- asked by Algohi (8 votes), answered by Karsten 7. (9 votes)

—————————-

[Programming the fiver game] http://mathematica.stackexchange.com/questions/120959/programming-the-fiver-game

Obviously, even if I ask a lot of question I am, obviously, still a dummy!!!!

I want to program the fiver game. It's a very simple game played solitary on a the rule is elementary : if ...

- asked by cyrille.piatecki (8 votes), answered by Mr.Wizard (15 votes)

[Creating 3D dice] http://mathematica.stackexchange.com/questions/110295/creating-3d-dice

How to create an image of a 3D die from the 2D images?

There is an example in the Documentation Center

I tried

but it doesn't work.

- asked by vito (13 votes), answered by Martin Ender (21 votes)

—————————-

[xkcd-style graphs] http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs

I received an email to which I wanted to respond with a xkcd-style graph, but I couldn't manage it. Everything I drew looked perfect, and I don't have enough command over PlotLegends to have these ...

- asked by Amatya (518 votes), answered by Simon Woods (371 votes)

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

[How to increase the image resolution of a map?] http://mathematica.stackexchange.com/questions/120572/how-to-increase-the-image-resolution-of-a-map

I'd like to obtain higher-resolution geographic maps retrieved from Wolfram geo server, since the standard resolution seems poor.

I tried to increase the ”TileSize” parameter, like this:

...

- asked by Fred (2 votes)

—————————-

[Hidden Markov Model: emissions probabilities dependent on observable parameter] http://mathematica.stackexchange.com/questions/120700/hidden-markov-model-emissions-probabilities-dependent-on-observable-parameter

I need to fit an HMM where the emission probabilities (ep) are discrete and dependent on a known variable quantity. E.g.:

Imagine a daily time series of binary emissions (”1” or ”2”). I suppose an ...

- asked by CupiDio (1 vote)

—————————-

[Why are there these jagged ”shards” in my RegionPlot3D?] http://mathematica.stackexchange.com/questions/120712/why-are-there-these-jagged-shards-in-my-regionplot3d

I'm creating a region out of two component regions. Before anyone suggests it (because a lot of similar questions are about it), I don't think the problem is increasing PlotPoints. I've increased it ...

- asked by YungHummmma (1 vote)

[How to extract the list of all matrices from a Block Diagonal Matrix?] http://mathematica.stackexchange.com/questions/120433/how-to-extract-the-list-of-all-matrices-from-a-block-diagonal-matrix

I am working on a function to do the opposite operation of How to form a block-diagonal Matrix from a list of matrices?

Here is my current algorithm: For i starting at 1, scan the elements of index ...

- asked by happy fish (11 votes), answered by yode (6 votes)

—————————-

[Collect all inputs from Documentation Center] http://mathematica.stackexchange.com/questions/120334/collect-all-inputs-from-documentation-center

Is it possible to collect all inputs programmatically from every function in the Documentation Center in a list and wrap them in a HoldComplete?

My case: With some fundamental functions modified, I ...

- asked by happy fish (9 votes), answered by Edmund (12 votes)

—————————-

[How to avoid procedural loops in this example?] http://mathematica.stackexchange.com/questions/120533/how-to-avoid-procedural-loops-in-this-example

I want to iterate over a list, and return the index as long as I found the first element satisfying my condition. Written in a for loop:

- asked by Nick (8 votes), answered by Gerli (5 votes)

—————————-

[Why does this LibraryLink function crash?] http://mathematica.stackexchange.com/questions/120384/why-does-this-librarylink-function-crash

Recently, I have rewritten pure Wolfram Language implementation CAGDBSplineSurface[] with C. Below is main LibraryLink code:

LibraryLink Code

- asked by Shutao TANG (8 votes), answered by happy fish (11 votes)

—————————-

[How can I combine a list of Line[]'s into one continuous Line?] http://mathematica.stackexchange.com/questions/120285/how-can-i-combine-a-list-of-lines-into-one-continuous-line

I have a huge list of Lines. Take this one as an example:

linelist1 = {Line[{{0.15042300130733277`,

0.09918669845167598`}, {0.15124668865085406`,

0.09522452324491057`}}],

...

0.09918669845167598`}, {0.15124668865085406`,

0.09522452324491057`}}],

...

- asked by YungHummmma (8 votes), answered by Michael E2 (12 votes)

—————————-

[NIntegrate appears to give incorrect results] http://mathematica.stackexchange.com/questions/120118/nintegrate-appears-to-give-incorrect-results

I am trying to specify a bivariate probability density function in Mathematica. As a check, I would like to confirm that it integrates to one. Here is the function:

- asked by Miguel (8 votes), answered by Anton Antonov (11 votes)

—————————-

[Which fonts are supported in Wolfram Cloud?] http://mathematica.stackexchange.com/questions/120102/which-fonts-are-supported-in-wolfram-cloud

I recently suggested creating dynamic community ads with Wolfram Cloud. @C.E. made a proof of concept ad to show that it works well.

Fonts are an important part of graphics design. It is useful to ...

- asked by Szabolcs (8 votes), answered by Szabolcs (5 votes)

[What is the best Mathematica tutorial for young people?] http://mathematica.stackexchange.com/questions/733/what-is-the-best-mathematica-tutorial-for-young-people

As Conrad Wolfram said at the TED conference, in the future kids should focus more on new technology. Computers compute better than humans, so we should focus more on thinking and getting the ...

- asked by noisy (44 votes), answered by Vitaliy Kaurov (23 votes)

—————————-

[Mathematica Minecraft] http://mathematica.stackexchange.com/questions/19669/mathematica-minecraft

Some time ago I asked myself: with all these great graphics and interactive capabilities of Mathematica, what kinds of 3D games can be implemented in it? And the answer which came to mind is ...

- asked by faleichik (140 votes), answered by faleichik (192 votes)

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

[integrate giving wrong result] http://mathematica.stackexchange.com/questions/120495/integrate-giving-wrong-result

A question with the same title has been asked many times, but I can't find the solution of my problem in their answers. The integral I am trying to calculate is

- asked by Felix (7 votes)

—————————-

[Why FinancialDerivative fails for the Spread case?] http://mathematica.stackexchange.com/questions/120277/why-financialderivative-fails-for-the-spread-case

According to the documentation center for FinancialDerivative in version 10.4, when there are multi assets, we still may use FinancialDerivative with the corresponding correlation matrix to find the ...

- asked by M.J.2 (2 votes)

—————————-

[What does the GraphLayout -¿ ”SpectralEmbedding” option do (mean) when displaying a graph?] http://mathematica.stackexchange.com/questions/120139/what-does-the-graphlayout-spectralembedding-option-do-mean-when-displayin

I have some relational data represented as a graph. As such some of the relational properties can be recognized. When I use the GraphLayout -¿ ”SpectralEmbedding” option a very nice and sharply ...

- asked by Phillip Dukes (5 votes)

[Which Object-oriented paradigm approach to use in Mathematica?] http://mathematica.stackexchange.com/questions/119991/which-object-oriented-paradigm-approach-to-use-in-mathematica

Which Object-Oriented Paradigm (OOP) approach to use in Mathematica for:

general implementation, or a particular project?

There are a lot of related questions and answers in MSE on doing OOP that ...

- asked by Anton Antonov (14 votes)

—————————-

[How can I use Mathematica to sort the US Congressional Districts by PerimeterArea] http://mathematica.stackexchange.com/questions/119944/how-can-i-use-mathematica-to-sort-the-us-congressional-districts-by-perimeter%c3%b7ar

The United States is divided into 435 congressional districts. Some of their shapes can be really strange due to gerrymandering. I think that I can find very gerrymandered congressional districts if ...

- asked by QuantumDot (13 votes), answered by Emilio Pisanty (6 votes)

—————————-

[Gillespie Stochastic Simulation Algorithm] http://mathematica.stackexchange.com/questions/119786/gillespie-stochastic-simulation-algorithm

The Gillespie SSA is a Monte Carlo stochastic simulation algorithm to find the trajectory a dynamic system described by a reaction (or interaction) network, e.g. chemical reactions or ecological ...

- asked by István Zachar (13 votes), answered by István Zachar (15 votes)

—————————-

[How to create a fascinating QR code like this?] http://mathematica.stackexchange.com/questions/120041/how-to-create-a-fascinating-qr-code-like-this

Check the facinating QRCode in my profile page here

You can find that this QRCode is some sort of intriguing as the QRCode is a IMAGE ITSELF!!!

So my question is, how to create such a QRCode ...

- asked by Wjx (11 votes), answered by Wjx (11 votes)

—————————-

[Data extraction from a picture of a graph] http://mathematica.stackexchange.com/questions/119666/data-extraction-from-a-picture-of-a-graph

How can I extract data from this picture of a graph?

The caption of the picture reads: ” Two-dimensional histogram values measured . Tick labels ...

- asked by psimeson (10 votes), answered by Simon Woods (16 votes)

—————————-

[Evaluating summations involving Fibonacci numbers in terms of Fibonacci numbers] http://mathematica.stackexchange.com/questions/119822/evaluating-summations-involving-fibonacci-numbers-in-terms-of-fibonacci-numbers

There are many summations involving Fibonacci numbers which Mathematica 10.4 is able to evaluate directly in terms of Fibonacci numbers. For example, Mathematica evaluates the summation given below as ...

- asked by John M. Campbell (9 votes), answered by yarchik (4 votes)

—————————-

[TreeForm outputs different results for the same inputs but why?] http://mathematica.stackexchange.com/questions/119745/treeform-outputs-different-results-for-the-same-inputs-but-why

First of all, please look at the below inputs and outputs:

In[1]:= $a = Array[# Range[#] &, {5}]

Out[1]= {{1}, {2, 4}, {3, 6, 9}, {4, 8, 12, 16}, {5, 10, 15, 20, 25}}

In[2]:= $af = Flatten[$a, ...

Out[1]= {{1}, {2, 4}, {3, 6, 9}, {4, 8, 12, 16}, {5, 10, 15, 20, 25}}

In[2]:= $af = Flatten[$a, ...

- asked by Taiki Bessho (8 votes), answered by JasonB (11 votes)

[How to plot an ellipse?] http://mathematica.stackexchange.com/questions/20100/how-to-plot-an-ellipse

I'm new to Mathematica, and I'm finding it difficult to plot an ellipse. I tried using

but I'm getting some errors. Is there something wrong ...

- asked by Sriram (6 votes), answered by Jens (15 votes)

—————————-

[Is it possible to draw this figure using Mathematica?] http://mathematica.stackexchange.com/questions/110848/is-it-possible-to-draw-this-figure-using-mathematica

The figure is

See the how-to video or a speeded-up GIF.

I believe it should be possible to draw this figure programmatically using some Random function, but I'm rather new to Mathematica, so I ...

- asked by AccidentalFourierTransform (50 votes), answered by M.R. (75 votes)

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

[Hide Notebook scrollbars] http://mathematica.stackexchange.com/questions/119665/hide-notebook-scrollbars

Is it possible to hide the scrollbars from the notebook windows while still being able to use the mousewheel to scroll? Since I never click on the bars themselves they're just a waste of space. It's ...

- asked by Ray (3 votes)

—————————-

[Hold Values of DensityPlot to use for an other DensityPlot] http://mathematica.stackexchange.com/questions/120022/hold-values-of-densityplot-to-use-for-an-other-densityplot

I have two surface functions, f[x,y] and g[x,y]. Assuming that the DensityPlot of f and g takes a while, is there a way to hold the values of DensityPlot, to efficiently DensityPlot f[x,y]-g[x,y] ?

...

- asked by Pierre L. (1 vote)

—————————-

[How to place window on second screen?] http://mathematica.stackexchange.com/questions/119835/how-to-place-window-on-second-screen

I am trying to open a window on a second screen (a thunderbolt display attached to a macbook pro) that is the full size of the second screen. Here is the command I use:

ThunderboltDimensions = 2560, ...

- asked by abwatson (1 vote)

[Is the renaming mechanism of ‘With‘ flawed?] http://mathematica.stackexchange.com/questions/119403/is-the-renaming-mechanism-of-with-flawed

I'm confused about the renaming mechanism of With:

With[{x = a}, Hold[With[{a = b}, a + 2 x]]]

(*==>Hold[With[{a$ = b}, a$ + 2 a]]*)

With[{x = a$}, Hold[With[{a = b}, a + 2 x]]]

...

(*==>Hold[With[{a$ = b}, a$ + 2 a]]*)

With[{x = a$}, Hold[With[{a = b}, a + 2 x]]]

...

- asked by luyuwuli (21 votes), answered by Leonid Shifrin (22 votes)

—————————-

[How do I increase the readability of this code?] http://mathematica.stackexchange.com/questions/119074/how-do-i-increase-the-readability-of-this-code

Below is some code I am working on; being a beginner. How can I increase the readability of the part behind Manipulate?

I can't read my own code anymore, because it is simply too long and unordered. ...

- asked by Imre Vegh (20 votes), answered by E.Doroskevic (16 votes)

—————————-

[Mysterious behaviour of Pick] http://mathematica.stackexchange.com/questions/119223/mysterious-behaviour-of-pick

As everyone knows, Pick can do amazing things, The most facinating phenomenon is that it can pick though all sorts of lists:

- asked by Wjx (18 votes), answered by WReach (25 votes)

—————————-

[How to debug the C code for LibraryLink?] http://mathematica.stackexchange.com/questions/119053/how-to-debug-the-c-code-for-librarylink

Recently, I use the C to rewrite a Mathematica function NonzeroBasis[], please see here for fully descriptions.

Here, NonzeroBasis[i,p,u,U] calculates the values of ...

- asked by Shutao TANG (11 votes), answered by Szabolcs (16 votes)

—————————-

[Is it possible to attach a debugger to a dynamically linked library on the supported OS?] http://mathematica.stackexchange.com/questions/119083/is-it-possible-to-attach-a-debugger-to-a-dynamically-linked-library-on-the-suppo

Recently, I discovered that LibraryLink technique is a very useful tool to improve the performance of function. Firstly, I need to use LibraryLink template to write C/C++ program. Then compiling the ...

- asked by Shutao TANG (10 votes), answered by user21 (3 votes)

—————————-

[Nothing not behaving as expected?] http://mathematica.stackexchange.com/questions/119239/nothing-not-behaving-as-expected

I was thinking that Nothing was doing the same job as the vanishing sequence ##&[].

Yet this exemple shows it doesn't.

Association[If[True,Nothing]] (*returns Association[Nothing]*)

...

Yet this exemple shows it doesn't.

Association[If[True,Nothing]] (*returns Association[Nothing]*)

...

- asked by faysou (10 votes), answered by Szabolcs (12 votes)

—————————-

[Random walk on a Sierpinski gasket] http://mathematica.stackexchange.com/questions/119036/random-walk-on-a-sierpinski-gasket

I am trying to simulate a random walk on a Sierpinski gasket. The best strategy i could come up with is to use Nearest point function to determine the next possible step of my walker. But this creates ...

- asked by FEARxxx (9 votes), answered by Wjx (11 votes)

[Creating legends for plots with multiple lines?] http://mathematica.stackexchange.com/questions/4025/creating-legends-for-plots-with-multiple-lines

So I have a graph with multiple lists, for e.g.

data = {{1,2}, {3,4}, {3,5}, {2,3} . . .}

If I then do ListLinePlot[Table[{#1,Log[b,#2]}&@@@data, {b,1,10,2}]] I have no way to generate a legend ...

If I then do ListLinePlot[Table[{#1,Log[b,#2]}&@@@data, {b,1,10,2}]] I have no way to generate a legend ...

- asked by Eiyriou von Kauyf (58 votes), answered by Jens (88 votes)

—————————-

[How can this image (optical illusion) be created with Mathematica?] http://mathematica.stackexchange.com/questions/24148/how-can-this-image-optical-illusion-be-created-with-mathematica

I came across this image the other day:

and liked the sensation of it pulsing. I was wondering if anyone would know how to create something similar with Mathematica (without the Pink Floyd Dark ...

- asked by Mike Honeychurch (51 votes), answered by halirutan (65 votes)

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

[Is pattern matching just systematic guessing and checking?] http://mathematica.stackexchange.com/questions/119394/is-pattern-matching-just-systematic-guessing-and-checking

How does the pattern matcher work?

how does it match this example?

My guess is that the pattern matcher collects all the names in the expression f[3, ...

- asked by John Conor Cosnett (3 votes)

—————————-

[How can I move he documentation to another location after install on Windows?] http://mathematica.stackexchange.com/questions/119503/how-can-i-move-he-documentation-to-another-location-after-install-on-windows

How can I move he documentation to another location after install on Windows?

I would like to move the documentation to another partition on my Windows filesystem. Michael Hale in chat recommended ...

- asked by jamesson (4 votes)

—————————-

[How to perform convolutions on this complicated pdf?] http://mathematica.stackexchange.com/questions/119034/how-to-perform-convolutions-on-this-complicated-pdf

For a known pdf f[x], I need to calculate integrals over the probability density of the sum of Log[f[x]] over independent samples:

Since the sample ...

- asked by Jerry Guern (2 votes)

[ graphic of soccer ball] http://mathematica.stackexchange.com/questions/118604/3d-graphic-of-soccer-ball

How to make a soccer ball graphic?

The following image is from Wikipedia, Spherical polyhedron:

Truncated icosahedron (left) and standard soccer ball (right)

...

- asked by vito (23 votes), answered by Michael E2 (23 votes)

—————————-

[The character sequence ”

. d” triggers line break in strings]
http://mathematica.stackexchange.com/questions/118801/the-character-sequence-d-triggers-line-break-in-strings

Bug introduced in 7.0 or earlier and persists through 10.4.1

Bug isn't present in version 5.2

Update: Sjoerd pointed out that this happens with any string and it is not related to StringForm. Just ...

- asked by Szabolcs (14 votes), answered by Sjoerd C. de Vries (12 votes)

—————————-

[Inconsistent handling of Dynamic option values; intended, omission, or bug?] http://mathematica.stackexchange.com/questions/118646/inconsistent-handling-of-dynamic-option-values-intended-omission-or-bug

In answering Dynamic ClipPlanes calculated from current ViewPoint Kuba and I got into a brief exchange regarding how Option values wrapped in Dynamic should be handled. For background John Fultz ...

- asked by Mr.Wizard (14 votes)

—————————-

[How can I plot this spirally surface?] http://mathematica.stackexchange.com/questions/118887/how-can-i-plot-this-spirally-surface

I would like to plot a surface that looks something like this sand spiral.

But I really have no idea how. Ideally I would like to be able to express this as a function in cartesian coordinates. I'm ...

- asked by user41147 (12 votes), answered by Thies Heidecke (28 votes)

—————————-

[Any manual on cell grouping management?] http://mathematica.stackexchange.com/questions/118649/any-manual-on-cell-grouping-management

Recently I come back to the problem of cell grouping and performed extensive search on this site and on MathGroup archive for information on how to use the possible values of the CellGroupingRules ...

- asked by Alexey Popkov (12 votes)

—————————-

[How can Mathematica be used to create Images like these?] http://mathematica.stackexchange.com/questions/118992/how-can-mathematica-be-used-to-create-images-like-these

Here are two examples of artistic image interpolation using just black lines. The first link shows the desired result created by an artist and the second done with C#.

TRIANGULATION: ANGULAR ...

- asked by R Hall (11 votes), answered by MarcoB (10 votes)

—————————-

[How to implement custom NIntegrate integration strategies?] http://mathematica.stackexchange.com/questions/118920/how-to-implement-custom-nintegrate-integration-strategies

How can new integration strategies algorithms be used with NIntegrate?

This is a different type of extension than the extensions with new integration rules, as described in the answer for the ...

- asked by Anton Antonov (10 votes), answered by Anton Antonov (10 votes)

[Fit image of mountain to gaussian] http://mathematica.stackexchange.com/questions/109946/fit-image-of-mountain-to-gaussian

I want to detect the edges of an image of a mountain and then fit that to a gaussian.

I am unsure about how to only get the mountain edge, rather than every single edge in the image.

How do I ...

- asked by olliepower (13 votes), answered by Dr. belisarius (14 votes)

—————————-

[How to find the position of elements in a list satisfying criteria] http://mathematica.stackexchange.com/questions/180/how-to-find-the-position-of-elements-in-a-list-satisfying-criteria

Say I have a list x={2,4,6,8,10} and I want to find out the positions of the elements that are greater than 7.

Select[x, #>7&] gives the elements themselves, and Position[x,8] gives the ...

Select[x, #>7&] gives the elements themselves, and Position[x,8] gives the ...

- asked by PeterR (32 votes), answered by J. M. (29 votes)

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

[Softmax Regression Classification Algorithm] http://mathematica.stackexchange.com/questions/118958/softmax-regression-classification-algorithm

I'm following the Stanford Machine Learning course while simultaneously developing my Mathematica abilities. I'm having issues with my Softmax Classifier implementation (for ref, have a look at these ...

- asked by Frederik Brinck Jensen (4 votes)

—————————-

[Protected Variable Error with Workbench 3.0] http://mathematica.stackexchange.com/questions/118919/protected-variable-error-with-workbench-3-0

I have Wolfram Workbench 3.0, build 78, with Mathematica 10.4 as the front end. I am using Windows 10. I am trying to run a simple test source code test.m:

I have an empty notebook ...

- asked by S2167 (2 votes)

—————————-

[Putting the elements of a list inside another list] http://mathematica.stackexchange.com/questions/118837/putting-the-elements-of-a-list-inside-another-list

I have the list list1 = 1, 3, 4, 5, 6 and want to put the elements of this list inside a list of 0's, list2 = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, where each element of list1 will be in the ...

- asked by user41129 (1 vote)

[Are you interested in a Wolfram Workbench Update?] http://mathematica.stackexchange.com/questions/118154/are-you-interested-in-a-wolfram-workbench-update

I also posted this on the Wolfram Community site (link below)

Last week I attended the Wolfram Tour (which was great). I asked whenever we could expect a new version of Workbench, as the current ...

- asked by Frank Martin (18 votes), answered by Anton Antonov (14 votes)

—————————-

[Is manual adjustment of AccuracyGoal and PrecisionGoal useless?] http://mathematica.stackexchange.com/questions/118249/is-manual-adjustment-of-accuracygoal-and-precisiongoal-useless

This is a problem confusing me for years.

AccuracyGoal and PrecisionGoal are two options that I never truly understand and, to be honest, always avoid touching. Let's first look at the descriptions ...

- asked by xzczd (15 votes)

—————————-

[Can Mathematica recompose an image?] http://mathematica.stackexchange.com/questions/117892/can-mathematica-recompose-an-image

The OP in this post on superuser.com asks how to recompose an image; quoting:

I have a set of images, which are parts of a bigger image.

I would like the images to assembled as automated as ...

- asked by mattiav27 (15 votes), answered by C. E. (13 votes)

—————————-

[How to implement custom integration rules for use by NIntegrate] http://mathematica.stackexchange.com/questions/118324/how-to-implement-custom-integration-rules-for-use-by-nintegrate

How can NIntegrate be extended with custom implementation of integration rules?

This answer of the question ”Monte Carlo integration with random numbers generated from a Gaussian distribution” shows ...

- asked by Anton Antonov (14 votes), answered by Anton Antonov (15 votes)

—————————-

[Unexpected behavior of Sequence – using Sequence to delete parts of an expression] http://mathematica.stackexchange.com/questions/118108/unexpected-behavior-of-sequence-using-sequence-to-delete-parts-of-an-expressi

I thought that assigning Sequence[] to the part of an expression was an effective way to remove it. For example, the following code yields 2,3,4,5:

Thus, I ...

- asked by Hector (10 votes), answered by Leonid Shifrin (6 votes)

—————————-

[Why NIntegrate is badly-behaved on by default?] http://mathematica.stackexchange.com/questions/117888/why-nintegrate-is-badly-behaved-on-j-frac92x-by-default

A friend of mine showed me this example:

Plot[BesselJ[9/2, x], {x, 0, 1},

PlotLabel -> Style["The integrand seems to be simple", 14]]

Integrate[BesselJ[9/2, x], {x, 0, 1}] // N

(* ...

PlotLabel -> Style["The integrand seems to be simple", 14]]

Integrate[BesselJ[9/2, x], {x, 0, 1}] // N

(* ...

- asked by xzczd (10 votes), answered by Anton Antonov (6 votes)

—————————-

[How do I insert OwnValues inside a held expression without evaluating it?] http://mathematica.stackexchange.com/questions/118030/how-do-i-insert-ownvalues-inside-a-held-expression-without-evaluating-it

Here is a very long and complicated expression, which we abbreviate as a. I store it using SetDelayed because I want to perform algebraic manipulations on it:

Here is a ...

- asked by QuantumDot (9 votes), answered by Kuba (9 votes)

- asked by J. M. (419 votes), answered by faysou (377 votes)

—————————-

[++ is dangerous for C programmers] http://mathematica.stackexchange.com/questions/107619/is-dangerous-for-c-programmers

I noticed this fact, that may be misleading for programmers used to C language.

In Mathematica, if you have a function f[] and an array v, and you write

the function f is called ...

- asked by Giovanni Resta (32 votes), answered by Mr.Wizard (24 votes)

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

[Solve and design ”water flow”] http://mathematica.stackexchange.com/questions/118183/solve-and-design-water-flow

In some strategy game I play, I'll have to change the terrain to make the water flow in some specific way to fulfill my goal. The water flow changes with terrain so if I can change the terrain wisely ...

- asked by Wjx (5 votes)

—————————-

[Is there a way to figure out the ”upper limit” of my PC's computational ability in Mathematica?] http://mathematica.stackexchange.com/questions/117852/is-there-a-way-to-figure-out-the-upper-limit-of-my-pcs-computational-ability

I am doing some simulations with Finite Element Analysis (FEA) and part of it is forming a mesh in 3D and then using NDSolveValue to solve a differential equation on that mesh.

For some meshes, my ...

- asked by YungHummmma (2 votes)

—————————-

[Numerical testing of Hardy's inequality] http://mathematica.stackexchange.com/questions/118061/numerical-testing-of-hardys-inequality

I want to check the following Hardy's most fundamental inequality by using Mathematica:

- asked by vito (2 votes)

[Bug with MapAt, Span, and Association?] http://mathematica.stackexchange.com/questions/116561/bug-with-mapat-span-and-association

Bug introduced in 10.0 and persisting through 10.4.1 or later

Related to Mapping (Query) a function at multiple locations in nested data via All, Span, it seems to me that the behavior of MapAt ...

- asked by Mr.Wizard (19 votes)

—————————-

[Joining points into 3D surface] http://mathematica.stackexchange.com/questions/117736/joining-points-into-3d-surface

This seems like a simple problem, but I can't find any questions like it here so I'm making a new one. Apologies if I missed one.

I have a list of points contained in a file which can be visualized ...

- asked by Crepo (12 votes), answered by george2079 (6 votes)

—————————-

[How to check the validity of an option value] http://mathematica.stackexchange.com/questions/116623/how-to-check-the-validity-of-an-option-value

I have a user-defined function, func, which takes the following form:

func[arg1, arg2, options]

Here is the actual code

Options[func] =

{opt1 -> Automatic, opt2 -> False, opt3 -> {1, ...

Here is the actual code

Options[func] =

{opt1 -> Automatic, opt2 -> False, opt3 -> {1, ...

- asked by Shutao TANG (12 votes), answered by Leonid Shifrin (10 votes)

—————————-

[Why does the GeoGraphics Frame show different Latitude than GeoPosition?] http://mathematica.stackexchange.com/questions/116507/why-does-the-geographics-frame-show-different-latitude-than-geoposition

The map looks right, but the Latitude in the Frame looks wrong.

Am I making a mistake or is this a bug?

- asked by vonkohorn (12 votes), answered by jose (8 votes)

—————————-

[Rotate Geographic map] http://mathematica.stackexchange.com/questions/117744/rotate-geographic-map

I want the map to be rotated by -45 Degree. I want to coast to be horizontal (perfect -45 degree). I already have:

- asked by Dennis (11 votes)

—————————-

[How to learn the LibraryLink technique for the newcomer?] http://mathematica.stackexchange.com/questions/116451/how-to-learn-the-librarylink-technique-for-the-newcomer

Description

For the built-in programming language(or called Wolfram Language) of Wolfram Mathematica, I think it is much easier and simpler to learn than other computer language(such as C/C++ or ...

- asked by Shutao TANG (11 votes), answered by Szabolcs (12 votes)

—————————-

[Nested association values validation. POJsO handling] http://mathematica.stackexchange.com/questions/116571/nested-association-values-validation-pojso-handling

Sometimes it is convenient to work in your package/app with ”objects” like:

childObject = <|

"id" -> 284,

"text" -> "texttext",

"property" -> <|

"type" -> "String",

...

"id" -> 284,

"text" -> "texttext",

"property" -> <|

"type" -> "String",

...

- asked by Kuba (9 votes), answered by Leonid Shifrin (5 votes)

- asked by J. M. (417 votes), answered by faysou (376 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 (126 votes), answered by Heike (105 votes)

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

[What is the difference between getting a boundary mesh from ToBoundaryMesh vs doing it with ToElementMesh?] http://mathematica.stackexchange.com/questions/116559/what-is-the-difference-between-getting-a-boundary-mesh-from-toboundarymesh-vs-do

I am trying to figure out how to define and use meshes for FEM and NDSolve. I've figured out that if I want more resolution near my boundaries, I can use ToBoundaryMesh to first create the boundary ...

- asked by YungHummmma (4 votes)

—————————-

[Solving Differential Equation for derivative] http://mathematica.stackexchange.com/questions/117689/solving-differential-equation-for-derivative

I am new to mathematica and am trying to solve a differential equation. Actually, I am not entirely sure if the system can be called differential equation.

I am interested in finding out the second ...

- asked by JKJ (1 vote)

—————————-

[ShortestTour Problem with Constraints] http://mathematica.stackexchange.com/questions/116505/shortesttour-problem-with-constraints

I can solve a travelling salesman problem with FindShortestTour[], but couldn't find any function to solve a shorest tour problem with additional constraints like cost, fuel capacity etc. How cam I ...

- asked by user40405 (3 votes)

[Determine whether points lie within a cow] http://mathematica.stackexchange.com/questions/116160/determine-whether-points-lie-within-a-cow

I would like to determine whether randomly-generated points

lX = RandomVariate[UniformDistribution[{-0.4, 0.4}], {1000}];

lY = RandomVariate[UniformDistribution[{-0.2, 0.2}], {1000}];

lZ = ...

lY = RandomVariate[UniformDistribution[{-0.2, 0.2}], {1000}];

lZ = ...

- asked by ben18785 (18 votes), answered by Daniel Lichtblau (12 votes)

—————————-

[FindMinimum doesn't increase step size when necessary] http://mathematica.stackexchange.com/questions/116295/findminimum-doesnt-increase-step-size-when-necessary

I've spent much time finding a minimal example demonstrating this problem with FindMinimum. Normally one faces this problem when fitting very large and complicated functions which cannot be posted ...

- asked by Alexey Popkov (13 votes)

—————————-

[Internal DynamicModule steals scope of external DynamicModule] http://mathematica.stackexchange.com/questions/116167/internal-dynamicmodule-steals-scope-of-external-dynamicmodule

I have two dynamic objects, one nested in the other. Both have their own functions defined, as follows. I have simplified them to the point where they don't make much sense, but can still illustrate ...

- asked by Istvan Zachar (13 votes), answered by John Fultz (6 votes)

—————————-

[Opposite of Alternatives in a Rule] http://mathematica.stackexchange.com/questions/116302/opposite-of-alternatives-in-a-rule

Mathematica provides Alternatives, to match one of several patterns. In a rule,

this is used as p1|p2|p3:>replacement. I would like to have the

opposite logic: p1&p2&p3:>replacement ...

this is used as p1|p2|p3:>replacement. I would like to have the

opposite logic: p1&p2&p3:>replacement ...

- asked by Bruno Le Floch (10 votes), answered by Bruno Le Floch (8 votes)

—————————-

[Symbolic and numeric limit disagreeing on branch cut of ArcTan] http://mathematica.stackexchange.com/questions/116183/symbolic-and-numeric-limit-disagreeing-on-branch-cut-of-arctan

Bug introduced after v8.0.4 and before v9.0.1, and persisting through v10.4.1.

Investigating comments to my previous question lead me to the following problem:

- asked by Axel Boldt (9 votes), answered by bbgodfrey (9 votes)

—————————-

[Why does the global variable exist here, where it was declared only in Module?] http://mathematica.stackexchange.com/questions/116140/why-does-the-global-variable-exist-here-where-it-was-declared-only-in-module

Why does Mathematica choose the mechanism that makes the global variable a here while parsing?

I don't understand why Mathematica goes in the way ...

- asked by Smart Humanism (8 votes), answered by Leonid Shifrin (15 votes)

—————————-

[Integrate and NIntegrate disagreeing over branch cut of Sqrt?] http://mathematica.stackexchange.com/questions/116041/integrate-and-nintegrate-disagreeing-over-branch-cut-of-sqrt

Bug introduced after v8.0.4 and before v9.0.1, and persisting through v10.4.1.

In Mathematica 10.2 I'm trying to integrate this piecewise continuous function, but Integrate and NIntegrate seem to ...

- asked by Axel Boldt (8 votes), answered by bbgodfrey (6 votes)

[Generating a Sierpinski carpet] http://mathematica.stackexchange.com/questions/22052/generating-a-sierpinski-carpet

I am trying to draw a Sierpinski_carpet. I have code that works, but I think there is a more elegant way to do than my way. Maybe I couls use Tuples or Permutations or some similar function to ...

- asked by chyaong (43 votes), answered by Mr.Wizard (67 votes)

—————————-

[Drawing a square root spiral] http://mathematica.stackexchange.com/questions/66969/drawing-a-square-root-spiral

Here is a start. I'm looking for a nice way to draw it.

Graphics[{EdgeForm[Black], White,

Polygon @ {{0, 0}, {-1, 0},

Sqrt[2] {Cos[#], Sin[#]} &[Pi - (ArcCot[1])]},

Polygon @ {{0, ...

Polygon @ {{0, 0}, {-1, 0},

Sqrt[2] {Cos[#], Sin[#]} &[Pi - (ArcCot[1])]},

Polygon @ {{0, ...

- asked by mathe (22 votes), answered by Bob Hanlon (18 votes)

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

[Problem with Parallelization when using Packages] http://mathematica.stackexchange.com/questions/115862/problem-with-parallelization-when-using-packages

I tried to find a solution to my problem in several answers posted in MSE but due to lack of my knowledge on parallelization territory, I couldn't figure out solution to my problem.

I have a big code ...

- asked by Algohi (4 votes)

—————————-

[Fourier transform of Exp[x]/x] http://mathematica.stackexchange.com/questions/116157/fourier-transform-of-expx-x

Could you please explain why Mathematica gives the following expression when taking Fourier transform of ?

- asked by Ivan Gankevich (4 votes)

—————————-

[Inconsistent behavior from RegionMeasure on the RegionIntersection between a Polygon and a Line] http://mathematica.stackexchange.com/questions/116083/inconsistent-behavior-from-regionmeasure-on-the-regionintersection-between-a-pol

Consider a Polygon with lines drawn between two of its vertices,

pgon = Get[

"https://gist.githubusercontent.com/jasondbiggs/\

59cb7d4aa802bde68c9f6a5203ef698f/raw/\

...

"https://gist.githubusercontent.com/jasondbiggs/\

59cb7d4aa802bde68c9f6a5203ef698f/raw/\

...

- asked by Jason is no longer a postdoc (1 vote)

[Pulsed NMR animation] http://mathematica.stackexchange.com/questions/115675/pulsed-nmr-animation

I'm new here and have never interacted with the community so excuse me if this has been asked before or if I format incorrectly or anything like that.

Anyway, I'm trying to make an animation for a ...

- asked by D. Sessions (13 votes), answered by Jack LaVigne (16 votes)

—————————-

[Plot 3D model of DNA in Mathematica] http://mathematica.stackexchange.com/questions/115491/plot-3d-model-of-dna-in-mathematica

My friend asked me if we can plot a 3D model of DNA (deoxyribonucleic acid) in Mathematica. However, I am not really familiar with this and I don't know if Mathematica can do this. Could you answer ...

- asked by BlueSky (12 votes), answered by JasonB (23 votes)

—————————-

[Exclude overlapping lists while keeping disjoint- and sub-lists?] http://mathematica.stackexchange.com/questions/115545/exclude-overlapping-lists-while-keeping-disjoint-and-sub-lists

Consider a function f[l1_List,l2_List] which is given lists of integers. Whenever two of the lists contain completely disjoint sets of integers OR one of the lists is completely contained in the ...

- asked by Kagaratsch (12 votes), answered by ciao (15 votes)

—————————-

- asked by ramesh (11 votes), answered by ubpdqn (6 votes)

—————————-

[Second argument of BeginPackage with nested package loading] http://mathematica.stackexchange.com/questions/115502/second-argument-of-beginpackage-with-nested-package-loading

I naively thought that the second argument of BeginPackage can simply be used to ensure the loading and availability in the $ContextPath of additional packages.

Example:

(* Pack1.m *) ...

- asked by Szabolcs (11 votes), answered by Leonid Shifrin (7 votes)

—————————-

[How to correctly implement in a new function the scoping behavior of Table, Sum and other commands that use Block to localize iterators?] http://mathematica.stackexchange.com/questions/115722/how-to-correctly-implement-in-a-new-function-the-scoping-behavior-of-table-sum

It is documented that ”Block is automatically used to localize values of iterators in iteration constructs such as Do, Sum, and Table.” Therefore the dummy index (iterator) in a Sum is shielded ...

- asked by MaTECmatica (9 votes), answered by Leonid Shifrin (6 votes)

—————————-

[Parallelization works, but does not use all CPU power] http://mathematica.stackexchange.com/questions/115436/parallelization-works-but-does-not-use-all-cpu-power

I've written code which involves Parallelize@Cases. When I evaluate, I find that all 16 cores are being used, but not fully; in other words all cores are active, but the total CPU usage is only 50

...

- asked by Luther (8 votes), answered by Szabolcs (17 votes)

[How was Mathematica built?] http://mathematica.stackexchange.com/questions/106020/how-was-mathematica-built

I've been wondering this for a while now: How was Mathematica built?

Is it written in Haskell? C++? I'd love to get a taste of the wizardry behind this incredible software.

- asked by Chet (17 votes), answered by Sjoerd C. de Vries (23 votes)

—————————-

[How do I clear all user defined symbols?] http://mathematica.stackexchange.com/questions/850/how-do-i-clear-all-user-defined-symbols

Is there some way to do this other than going to Evaluation ->

Quit kernel and firing a new one up?

Quit kernel and firing a new one up?

- asked by niklasfi (42 votes), answered by Artes (36 votes)

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

[How can I define MakeBoxes for Inactive forms user-defined heads?] http://mathematica.stackexchange.com/questions/115638/how-can-i-define-makeboxes-for-inactive-forms-user-defined-heads

Here I define a MakeBoxes for Times:

MakeBoxes[p : Inactive[Times][args___], form_] :=

MakeBoxes[Interpretation[HoldForm@myHead[args], p], form]

And it works as expected:

Inactivate[Times[3, ...

MakeBoxes[Interpretation[HoldForm@myHead[args], p], form]

And it works as expected:

Inactivate[Times[3, ...

- asked by QuantumDot (2 votes)

—————————-

[Quits Kernel during evaluation of CreateTopologies] http://mathematica.stackexchange.com/questions/115660/quits-kernel-during-evaluation-of-createtopologies

I am using Feynarts 3.9 and FeynCalc 9.0.1 with Mathematica 10. Every time I load FeynArts with FeynCalc and execute

mathematica quits the kernel after a few ...

- asked by Heerak Banerjee (1 vote)

—————————-

[Inconsistent performance of code] http://mathematica.stackexchange.com/questions/115634/inconsistent-performance-of-code

I'm trying to do some optimizations to my code to make it run faster, but it seems that there are inconsistencies in the performance of the code. Namely, the codes have different performance in ...

- asked by xslittlegrass (5 votes)

[Speedup matrix number multiplication] http://mathematica.stackexchange.com/questions/115087/speedup-matrix-number-multiplication

Consider this simple matrix number multiplication:

lth = 200;

mtx = RandomReal[{0, 1}, {lth, lth}];

ls = RandomReal[{0, 1}, {lth}];

Et = Function[{t}, Sin[(Pi t)/20] Sin[2 t]];

Etc = Compile[{{t, ...

mtx = RandomReal[{0, 1}, {lth, lth}];

ls = RandomReal[{0, 1}, {lth}];

Et = Function[{t}, Sin[(Pi t)/20] Sin[2 t]];

Etc = Compile[{{t, ...

- asked by xslittlegrass (15 votes), answered by xslittlegrass (5 votes)

—————————-

[Fit a function with an unusual side condition] http://mathematica.stackexchange.com/questions/114864/fit-a-function-with-an-unusual-side-condition

I have a set of measurement data and I try to fit there a function (a Exp[b x] + c Exp[d x] - o). I have two problems:

The fit function does not converge nor after iterations. The fit function ...

- asked by Lutscher (12 votes), answered by Anton Antonov (15 votes)

—————————-

[Tips to move from functional programming to GUI-based applications] http://mathematica.stackexchange.com/questions/114984/tips-to-move-from-functional-programming-to-gui-based-applications

Even though this forum has some questions related to Mathematica programming tips I think that we still don't have specific help for those who want to learn to efficiently create GUIs in Mathematica. ...

- asked by Ariel Sepulveda (11 votes), answered by Brian G (0 votes)

—————————-

[Longest common substring for multiple strings?] http://mathematica.stackexchange.com/questions/114979/longest-common-substring-for-multiple-strings

I'm looking for a way to get the longest common substring for multiple strings such as

should yield

...

- asked by nqduy (10 votes), answered by xslittlegrass (9 votes)

—————————-

[How does a Pringle lose its curvature?] http://mathematica.stackexchange.com/questions/115231/how-does-a-pringle-lose-its-curvature

Nom!

As part of a bigger project, I've was writing some code to calculate the scalar curvature of surfaces of the form . This uses a general calculation of the scalar curvature to produce ...

- asked by Lucas (9 votes), answered by KraZug (9 votes)

—————————-

[How to make datasets display correctly?] http://mathematica.stackexchange.com/questions/115246/how-to-make-datasets-display-correctly

NB: The problem illustrated below is truly ubiquitous. I hope the examples given below are sufficiently different to demonstrate this fact, and to discourage answers that hinge on the details of the ...

- asked by kjo (9 votes), answered by Stefan R (9 votes)

—————————-

[How do I translate a list of English words into another language using an online translation service with Mathematica?] http://mathematica.stackexchange.com/questions/115141/how-do-i-translate-a-list-of-english-words-into-another-language-using-an-online

As far as I know, there are two posts on this topic: Can I use Mathematica to translate a English word to a Chinese characters? and *How can I use Mathematica to get the translated result from the ...

- asked by matheorem (9 votes), answered by Rashid (11 votes)

[What is the best Mathematica tutorial for young people?] http://mathematica.stackexchange.com/questions/733/what-is-the-best-mathematica-tutorial-for-young-people

As Conrad Wolfram said at the TED conference, in the future kids should focus more on new technology. Computers compute better than humans, so we should focus more on thinking and getting the ...

- asked by noisy (43 votes), answered by Vitaliy Kaurov (23 votes)

—————————-

[How to make use of Associations?] http://mathematica.stackexchange.com/questions/52393/how-to-make-use-of-associations

I have been curious about it for long. Now that Mathematica 10 arrives, I think it's time to ask the question: How the new Association data structure would be used to improve Mathematica programming?

...

- asked by Yi Wang (110 votes), answered by Leonid Shifrin (128 votes)

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

[PearsonChiSquareTest for count/frequency data?] http://mathematica.stackexchange.com/questions/114905/pearsonchisquaretest-for-count-frequency-data

I read with interest a previous question on the PearsonChiSquareTest from a few years ago, and one answer was very helpful:

Performing a chi-square goodness of fit test

Have there been any updates ...

- asked by Jim (3 votes)

—————————-

[ParallelDo issue with SQLExecute (SQLite)] http://mathematica.stackexchange.com/questions/115263/paralleldo-issue-with-sqlexecute-sqlite

This code run as expected if I use Do[...], but if I use instead ParallelDo[...], as in the code bellow, the SQL INSERT statements seems to be completely ignored.

In both cases, the filename is ...

- asked by jss (2 votes)

—————————-

[Why does Kernels[] produce this error?] http://mathematica.stackexchange.com/questions/115100/why-does-kernels-produce-this-error

Most of times, on my PC, when Kernel[] is launched for the first time, produces this error:

Executed again returns .

Is it a clue of malfunctioning or is, for reason I'm unaware of, the way it ...

- asked by mitochondrial (3 votes)

[Understanding evaluation and typesetting] http://mathematica.stackexchange.com/questions/114305/understanding-evaluation-and-typesetting

Background

So, one could be surprised by the fact that:

This issue and methods of prevention are discussed in Prevent graphics render ...

- asked by Kuba (16 votes), answered by Alexey Popkov (7 votes)

—————————-

[Empty WhenEvent action crashes kernel] http://mathematica.stackexchange.com/questions/114314/empty-whenevent-action-crashes-kernel

Bug introduced in 9.0 and persisting through 10.4.1 WhenEvent is new in 9.0.

This is an example from the docs, slightly modified (action is wrapped in ), working as expected.

NDSolve[x'[t] == ...

- asked by Istvan Zachar (12 votes), answered by Istvan Zachar (3 votes)

—————————-

[Difference between = and Ctrl + =] http://mathematica.stackexchange.com/questions/114357/difference-between-and-ctrl

What is a difference between , and Ctrl + ?

For instance

there are some examples, but result is same.

and

- asked by vito (11 votes), answered by WReach (19 votes)

—————————-

[Is there a way to make links to functions in a notebook?] http://mathematica.stackexchange.com/questions/114342/is-there-a-way-to-make-links-to-functions-in-a-notebook

Frequently I'm working on a function that's at the top of my notebook in a ”functions” section, but I'm looking at the output of it in a lower ”body” section of the notebook. When I want to edit the ...

- asked by YungHummmma (11 votes), answered by Mr.Wizard (11 votes)

—————————-

[Strategies to compensate for lack of multi-document interface?] http://mathematica.stackexchange.com/questions/114515/strategies-to-compensate-for-lack-of-multi-document-interface

I use Mathematica (Home Edition) to manage notes which live in a large number of different notebooks. In my case the notebooks (hundreds) are just organized using document names and file system ...

- asked by billc (10 votes), answered by Leonid Shifrin (10 votes)

—————————-

[Definition of Mod and Quotient with complex arguments] http://mathematica.stackexchange.com/questions/114361/definition-of-mod-and-quotient-with-complex-arguments

How are Mod and Quotient defined for three real/complex arguments? I wasn't able to find the definition.

My main surprise so far when investigating their behavior is a discontinuity between real and ...

- asked by Bruno Le Floch (10 votes), answered by Chip Hurst (10 votes)

—————————-

[HighlightGraph Problem] http://mathematica.stackexchange.com/questions/114725/highlightgraph-problem

Bug introduced in 9.0 or earlier and persisting through 10.4.1

HighlightGraph does not work.

HighlightGraph[Graph[{{0, 0}, {0, 1}, {1, 0}, {1, 1}}, {{0, 0} \[UndirectedEdge] {0, 1}}], {{0, 0}, {0, ...

- asked by ZYX (8 votes), answered by Szabolcs (5 votes)

[Labeling individual curves in Mathematica] http://mathematica.stackexchange.com/questions/4444/labeling-individual-curves-in-mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal experience, PlotLegends is pretty bad.

Is ...

- asked by Tianxiang Xiong (42 votes), answered by Artes (36 votes)

—————————-

[Drawing a square root spiral] http://mathematica.stackexchange.com/questions/66969/drawing-a-square-root-spiral

Here is a start. I'm looking for a nice way to draw it.

Graphics[{EdgeForm[Black], White,

Polygon @ {{0, 0}, {-1, 0},

Sqrt[2] {Cos[#], Sin[#]} &[Pi - (ArcCot[1])]},

Polygon @ {{0, ...

Polygon @ {{0, 0}, {-1, 0},

Sqrt[2] {Cos[#], Sin[#]} &[Pi - (ArcCot[1])]},

Polygon @ {{0, ...

- asked by mathe (22 votes), answered by Bob Hanlon (17 votes)

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

[FrobeniusSolve: how does it work?] http://mathematica.stackexchange.com/questions/114308/frobeniussolve-how-does-it-work

Can someone suggest any reference to read? I would like to understand how the algorithm works.

- asked by Mirko Aveta (3 votes)

—————————-

[How to delete lines containing specific values from a matrix?] http://mathematica.stackexchange.com/questions/114709/how-to-delete-lines-containing-specific-values-from-a-matrix

I am doing some numerical computations and a few iterations return values that are obviously incorrect (some numerical integration problem, I suppose.). I have managed to set these values to zero but ...

- asked by Gabu (2 votes)

—————————-

[ImageSize not working correctly with Placed directive] http://mathematica.stackexchange.com/questions/114580/imagesize-not-working-correctly-with-placed-directive

It seems that having Placed inside Plot breaks the ImageSize specification:

cm = 72/2.54;

plt =

LogLogPlot[Exp[x], {x, 1, 3},

ImageSize -> 12 cm,

AspectRatio -> 0.73,

Frame -> ...

plt =

LogLogPlot[Exp[x], {x, 1, 3},

ImageSize -> 12 cm,

AspectRatio -> 0.73,

Frame -> ...

- asked by leosenko (2 votes)

[Find duplicates in list of InfiniteLine] http://mathematica.stackexchange.com/questions/114046/find-duplicates-in-list-of-infiniteline

MMA 10 introduced a new function, which can be very convenient: InfiniteLine.

Of course, two infinite lines can be described by different arguments: for example InfiniteLine[0,0,1,0] and ...

- asked by anderstood (14 votes), answered by kglr (12 votes)

—————————-

[Is there any harm or benefit to Removing unneeded private symbols in packages?] http://mathematica.stackexchange.com/questions/114106/is-there-any-harm-or-benefit-to-removing-unneeded-private-symbols-in-packages

One of the things I noticed is that in typical medium-to-large sized packages, a huge number of symbols are created in the myPackage‘Private context. You can see a list of them by running

? ...

- asked by QuantumDot (12 votes), answered by R. M. (18 votes)

—————————-

[Can Mathematica solve functional equations with nested variable?] http://mathematica.stackexchange.com/questions/114210/can-mathematica-solve-functional-equations-with-nested-variable

First, inline free form input can solve these equations:

But it seems no native Mathematica function can solve these, there is even an error page for equations of this form (nestdv).

Now my ...

- asked by happy fish (10 votes)

—————————-

[How to describe the convex hull of a set of points as an implicit region for optimization?] http://mathematica.stackexchange.com/questions/113689/how-to-describe-the-convex-hull-of-a-set-of-points-as-an-implicit-region-for-opt

Last edit: 2016-05-03

A.G.'s answer was the one helped me the most, see explanation at the end of this question.

Original question

In Mathematica you can create out of a set of points in 2D and 3D ...

- asked by Mauricio Lobos (10 votes), answered by A.G. (2 votes)

—————————-

[NDEigensystem returns incorrect eigenvalues for 2D coulomb problem, eigenfunctions contain discontinuity] http://mathematica.stackexchange.com/questions/113898/ndeigensystem-returns-incorrect-eigenvalues-for-2d-coulomb-problem-eigenfunctio

I posted a similar question a short time ago regarding the 3D Coulomb problem. Jens' excellent answer to this thread allowed me to obtain the correct eigenvalues and eigenenergies for that system.

I ...

- asked by Matthew Brunetti (10 votes), answered by Jens (12 votes)

—————————-

[RandomInteger: speed with long lists] http://mathematica.stackexchange.com/questions/114047/randominteger-speed-with-long-lists

I noticed an interesting effect with RandomInteger when looking at the time to create random integers. The following code lines all take about 0.5 seconds on a i7 Windows 64bit Laptop:

...

- asked by Eisbar (9 votes), answered by Daniel Lichtblau (8 votes)

—————————-

[Creating Saveable-¿False notebooks] http://mathematica.stackexchange.com/questions/113858/creating-saveable-false-notebooks

Bug introduced in 10.3 or earlier and persisting through 10.4.1

Reproduced on Windows 7, 10

I'm having difficulties with programmatic creation of non saveable notebooks on Windows with V10.4.1.

...

- asked by Kuba (9 votes), answered by Kuba (7 votes)

[How to make use of Associations?] http://mathematica.stackexchange.com/questions/52393/how-to-make-use-of-associations

I have been curious about it for long. Now that Mathematica 10 arrives, I think it's time to ask the question: How the new Association data structure would be used to improve Mathematica programming?

...

- asked by Yi Wang (109 votes), answered by Leonid Shifrin (127 votes)

—————————-

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by Dr. belisarius (308 votes), answered by Michael E2 (177 votes)

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

[Integrate producing bad result] http://mathematica.stackexchange.com/questions/113791/integrate-producing-bad-result

I noticed a bug in Mathematica. It computes incorrectly a definite integral

Integrate[y* Sqrt[(l1^2 - y^2) (l2^2 - y^2)]/(a^2 - y^2), {y, 0, l1},

Assumptions -> l2 > a > l1 > 0]

Assumptions -> l2 > a > l1 > 0]

and ...

- asked by user1765636 (3 votes)

—————————-

[FindPeaks error ” Expecting an image or graphics instead of”] http://mathematica.stackexchange.com/questions/113884/findpeaks-error-expecting-an-image-or-graphics-instead-of

I'm running Mathematica 10.3.1.0 on windows 7 Professional Sp.1 when I try to use FindPeaks I keep getting the following error, even when trying the example in the documentation.

I have done the ...

- asked by Phymonkey (2 votes)

—————————-

[How can I set notebook's options without opening it?] http://mathematica.stackexchange.com/questions/113816/how-can-i-set-notebooks-options-without-opening-it

At present moment, to batch apply a change in a set of notebook I use a ”brute force”, rough, method:

- asked by mitochondrial (3 votes)

by Boris Ljubicic. ...

- asked by VividD (59 votes), answered by Martin Buttner (54 votes)

—————————-

[Numerical inverse Laplace-Hankel transform for a highly oscillatory function] http://mathematica.stackexchange.com/questions/113240/numerical-inverse-laplace-hankel-transform-for-a-highly-oscillatory-function

When trying to reproduce the result of this paper about numerical solution of Lamb's problem, I encountered the double integral (to be more precise, the 0-order inverse Hankel-Laplace transform) of a ...

- asked by xzczd (11 votes)

—————————-

[Fitting Stradivari's scroll] http://mathematica.stackexchange.com/questions/113273/fitting-stradivaris-scroll

How can I find the simplest curve that gives me a scroll like this?

This is where I am at the moment and doing it by hand is becoming more and more cumbersome.

First, take a drawing of the scroll ...

- asked by tsuresuregusa (11 votes), answered by nikie (13 votes)

—————————-

[NDEigensystem cannot solve numerically the 3D Coulomb problem, while DSolve returns the right answer] http://mathematica.stackexchange.com/questions/113520/ndeigensystem-cannot-solve-numerically-the-3d-coulomb-problem-while-dsolve-retu

After having derived by hand the eigenvalues and eigenfunctions for the 3D and 2D hydrogen atom, I want to solve the systems numerically using Mathematica. I need to do this because my next step is to ...

- asked by Matthew Brunetti (9 votes), answered by user21 (4 votes)

—————————-

[Make the moon's 3D gif] http://mathematica.stackexchange.com/questions/113217/make-the-moons-3d-gif

How do I make the following gif

I tried:

moon = Import[

"https://upload.wikimedia.org/wikipedia/commons/f/f0/Full_Moon_as_Seen_From_Denmark.jpg"];

{r, g, b} = ColorSeparate[ImageResize[moon, ...

"https://upload.wikimedia.org/wikipedia/commons/f/f0/Full_Moon_as_Seen_From_Denmark.jpg"];

{r, g, b} = ColorSeparate[ImageResize[moon, ...

- asked by vito (9 votes), answered by Kuba (13 votes)

—————————-

[How to generate this structure of a list without ‘While‘ and the like?] http://mathematica.stackexchange.com/questions/113307/how-to-generate-this-structure-of-a-list-without-while-and-the-like

I need to create a list that holds, for given integer d, the elements where is just denoting increment by 1 until the next written ...

- asked by Lukas (8 votes), answered by ciao (3 votes)

—————————-

[Join a list with 6, 6, 2 dimensions with a list 6, 6 dimensions] http://mathematica.stackexchange.com/questions/113630/join-a-list-with-6-6-2-dimensions-with-a-list-6-6-dimensions

listA = {{a1, a2, a3, a4, a5, a6},

{b1, b2, b3, b4, b5, b6},

{c1, c2, c3, c4, c5, c6},

{d1, d2, d3, d4, d5, d6},

{e1, e2, e3, e4, e5, e6},

{f1, f2, f3, f4, f5, f6}}

listB = {{{n1, p1}, {n2, p2}, ...

{b1, b2, b3, b4, b5, b6},

{c1, c2, c3, c4, c5, c6},

{d1, d2, d3, d4, d5, d6},

{e1, e2, e3, e4, e5, e6},

{f1, f2, f3, f4, f5, f6}}

listB = {{{n1, p1}, {n2, p2}, ...

- asked by SPIL (7 votes), answered by Kuba (6 votes)

[How to plot an ellipse?] http://mathematica.stackexchange.com/questions/20100/how-to-plot-an-ellipse

I'm new to Mathematica, and I'm finding it difficult to plot an ellipse. I tried using

but I'm getting some errors. Is there something wrong ...

- asked by Sriram (5 votes), answered by Jens (15 votes)

—————————-

[Multivariable Taylor expansion does not work as expected] http://mathematica.stackexchange.com/questions/15023/multivariable-taylor-expansion-does-not-work-as-expected

The basic multivariable Taylor expansion formula around a point is as follows:

- asked by matheorem (24 votes), answered by Jens (29 votes)

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

[JournalArticle does not react on the PointSize option] http://mathematica.stackexchange.com/questions/113547/journalarticle-does-not-react-on-the-pointsize-option

The Default StyleSheet recognizes the PointSize option for ListPlot:

ListPlot[Table[Table[{i, j*i}, {i, 1, 10}], {j, 1, 3}],

PlotStyle -> {{Red, PointSize[0.1]}, {Blue, PointSize[0.05]}, ...

PlotStyle -> {{Red, PointSize[0.1]}, {Blue, PointSize[0.05]}, ...

- asked by Alexei Boulbitch (2 votes)

—————————-

[How to trace the stylesheet directives responsible for the selected text's appearance?] http://mathematica.stackexchange.com/questions/113495/how-to-trace-the-stylesheet-directives-responsible-for-the-selected-texts-appea

By way of example, in a typical Mathematica interactive session, one sees text content as shown below:

Three different text styles can be seen in this figure: input, output, and the style for the ...

- asked by kjo (5 votes)

—————————-

[How do I get my ZWO ASI120MM astro-camera to work in MMA?] http://mathematica.stackexchange.com/questions/113481/how-do-i-get-my-zwo-asi120mm-astro-camera-to-work-in-mma

I am using Windows 10 + MMA 10.4.1. I bought a ZWO ASI120MM astro camera which I want to use as a guiding camera during astrophotography. From this site (http://astronomy-imaging-camera.com/software/) ...

- asked by Max (2 votes)

How to make an animation of following gif in Mathematica?

Edit: The animation shown above was created by Charlie Deck in processing.

And how to make 3D analog?

I tried first few steps

line = ...

- asked by vito (36 votes), answered by C. E. (38 votes)

—————————-

[Can you plot pure function without specifying variable?] http://mathematica.stackexchange.com/questions/112478/can-you-plot-pure-function-without-specifying-variable

Given a pure function, e.g. f=Sin[#]& it is possible to plot it with introducing an arbitrary local variable, e.g.,

Plot[f[x],x,0,1]

However, the introduction of a variable x seems ...

- asked by JeffDror (15 votes), answered by Jens (12 votes)

—————————-

[Vizualization of percolation paths] http://mathematica.stackexchange.com/questions/112878/vizualization-of-percolation-paths

I did a simple demonstration to illustrate the percolation theory for my students. The content is a conductive square network possessing electrodes at its top and bottom edges. Some randomly chosen ...

- asked by Alexei Boulbitch (13 votes), answered by Kuba (8 votes)

—————————-

[How to access FEM shape functions] http://mathematica.stackexchange.com/questions/112907/how-to-access-fem-shape-functions

A couple of days ago I asked here about surface meshes and plotting on surfaces.

Now I have another question: How can I access the surface or boundary element shape functions?

I would like to ...

- asked by AxelF (9 votes), answered by user21 (7 votes)

—————————-

[Finding peaks of curve with small values] http://mathematica.stackexchange.com/questions/112993/finding-peaks-of-curve-with-small-values

I have 2d data of which I want to find the peaks.

data << "http://pastebin.com/raw/EQFz1KFn";

peaks = FindPeaks[data[[All, 2]], 0, 0, -Infinity] // N

peaks = FindPeaks[data[[All, 2]], 0, 0, -Infinity] // N

The magnitudes of the found peaks are ...

- asked by mrz (8 votes), answered by JasonB (11 votes)

—————————-

[Is there research about the Mathematica programming paradigm?] http://mathematica.stackexchange.com/questions/112920/is-there-research-about-the-mathematica-programming-paradigm

There seem to be lots of papers discussing the functional programming paradigm terminology for Haskell, such as monad, category theory, lambda calculus, *morphism, etc. People study concepts and ...

- asked by Eric (8 votes)

—————————-

[Constructing a graph from a distance matrix] http://mathematica.stackexchange.com/questions/112745/constructing-a-graph-from-a-distance-matrix

I have a set of 2-dimensional points. We can compute a distance matrix (Euclidean distance) for using say this answer. I wish to form an -vertex graph having the points as vertices, ...

- asked by Juho (8 votes), answered by Martin Buttner (9 votes)

Is ...

- asked by Tianxiang Xiong (42 votes), answered by Artes (36 votes)

—————————-

[What is the best Mathematica tutorial for young people?] http://mathematica.stackexchange.com/questions/733/what-is-the-best-mathematica-tutorial-for-young-people

As Conrad Wolfram said at the TED conference, in the future kids should focus more on new technology. Computers compute better than humans, so we should focus more on thinking and getting the ...

- asked by noisy (43 votes), answered by Vitaliy Kaurov (23 votes)

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

[Possible reduced GUI performance in 10.4] http://mathematica.stackexchange.com/questions/112526/possible-reduced-gui-performance-in-10-4

I have observed significantly reduced performance in GUI in Mathematica v10.4. This is especially visible in autocomplete feature delays. This is very evident when I turn some power saving features ...

- asked by leosenko (3 votes)

—————————-

[Why does Eigenvalues work for a matrix but not ?] http://mathematica.stackexchange.com/questions/112619/why-does-eigenvalues-work-for-a-matrix-m-but-not-m

which I'll call mat. In a blur of human error, I computed the eigenvalues of mat with an extra set of curly braces surrounding it. To my surprise, this ...

- asked by user170231 (3 votes)

—————————-

[Calculate the ESP Grid based on Density Grid] http://mathematica.stackexchange.com/questions/112872/calculate-the-esp-grid-based-on-density-grid

I want to build a fast way to convert a density grid file into a grid file of the respective electrostatic potential (ESP; also known as MEP, the molecular electrostatic potential).

This ...

- asked by pH13 - Yet another Philipp (3 votes)

[How to model wooden joints with mathematica's FEM?] http://mathematica.stackexchange.com/questions/111960/how-to-model-wooden-joints-with-mathematicas-fem

This is a dovetail joint:

and I'd like to see the stresses and deformation on the joint.I haven't seen any modeling of disconnected regions with FEM, only connected regions, so I'm curious if you ...

- asked by tsuresuregusa (16 votes), answered by user21 (6 votes) —————————-

[Possible Bug in ArrayMesh] http://mathematica.stackexchange.com/questions/111945/possible-bug-in-arraymesh

Suppose we have the following array from which we intend to create an ArrayMesh:

arr = {{{1, 1, 1}, {1, 0, 1}, {1, 1, 0}}, {{1, 1, 1}, {0, 1, 1}, {1, 1,

0}}, {{0, 1, 0}, {0, 1, 1}, {0, 0, 1}}};

0}}, {{0, 1, 0}, {0, 1, 1}, {0, 0, 1}}};

...

- asked by RunnyKine (15 votes), answered by ilian (9 votes)

—————————-

[How to draw all paths from (1,1) to (n,n) by move (+1, 0) or (0, +1)?] http://mathematica.stackexchange.com/questions/112395/how-to-draw-all-paths-from-1-1-to-n-n-by-move-1-0-or-0-1

Now I can draw some grid:

But what I want(I'm sorry for the weird line. I have no image processing software in my mac...):

Please notice:

- asked by Sayakiss (14 votes), answered by wxffles (14 votes)

—————————-

[All the food WolframAlpha knows about] http://mathematica.stackexchange.com/questions/112104/all-the-food-wolframalpha-knows-about

I want to plot some nutritional values and do some computation with it.

Is there an analogue of CountryData[] to get a list of all the foods for which WA has information?

- asked by Andrea Di Biagio (12 votes), answered by C. E. (12 votes)

—————————-

[RegionNearest and neighborhoods] http://mathematica.stackexchange.com/questions/112264/regionnearest-and-neighborhoods

In this previous question we see that RegionNearest isn't quite as 'capable' as Nearest for some things.

Similarly, I need to be able to find a given neighborhood of points on a MeshRegion. With ...

- asked by flip (11 votes), answered by Simon Woods (10 votes)

—————————-

[How do I extract a matrix of only positive numbers given a set of assumptions?] http://mathematica.stackexchange.com/questions/111989/how-do-i-extract-a-matrix-of-only-positive-numbers-given-a-set-of-assumptions

I want to divide a matrix:

mat = {{a, 0, -b}, {d, a, 0}, {0, 0, -a}}

with the following assumptions:

a >= 0, b >= 0, d >= 0

with the following assumptions:

a >= 0, b >= 0, d >= 0

Into two matrices, one containing the positive elements, and one ...

- asked by Luis Fernando (11 votes), answered by b.gatessucks (14 votes)

—————————-

[How to type text with an underbrace underneath it like: ?] http://mathematica.stackexchange.com/questions/111970/how-to-type-text-with-an-underbrace-underneath-it-like-underbraceg-g-n-t

I want to use the underbrace ”esc u esc” but have it placed underneath text. Like

in a mathematica text cell. Is it possible? Thanks

- asked by Craig (11 votes), answered by JasonB (16 votes)

[How to plot an ellipse?] http://mathematica.stackexchange.com/questions/20100/how-to-plot-an-ellipse

I'm new to Mathematica, and I'm finding it difficult to plot an ellipse. I tried using

but I'm getting some errors. Is there something wrong ...

- asked by Sriram (5 votes), answered by Jens (15 votes)

—————————-

[How to manipulate 2D plots?] http://mathematica.stackexchange.com/questions/7142/how-to-manipulate-2d-plots

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...

- asked by Istvan Zachar (94 votes), answered by Istvan Zachar (105 votes)

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

[Possible Bug in LinearSolveFunction with Sparse Vectors] http://mathematica.stackexchange.com/questions/112313/possible-bug-in-linearsolvefunction-with-sparse-vectors

Bug introduced in 5.0 and persists through 10.4

LinearSolveFunction is new in 5.0

Consider the following set of equations and corresponding variables:

- asked by RunnyKine (8 votes)

—————————-

[Why FoldList 5 times faster than Apply for matrix multiplication?] http://mathematica.stackexchange.com/questions/112125/why-foldlist-5-times-faster-than-apply-for-matrix-multiplication

Consider this list of matrices:

Now compare timings of Apply and FoldList for matrix multiplication:

- asked by Lukas (6 votes)

—————————-

[Generating OpenCL C code] http://mathematica.stackexchange.com/questions/112127/generating-opencl-c-code

I'm trying to make an interactive complex function plotter using OpenCl. So far I can only plot functions that I hardcode into the kernel by hand. I'd like to be able to use ComplexExpand@#@f@(x + ...

- asked by ra91 (6 votes)

[Rounding the Corners of a Shape] http://mathematica.stackexchange.com/questions/111479/rounding-the-corners-of-a-shape

I was wondering whether there is an option in Mathematica that enables me to smooth the corners of a shape. The example I want to start with is the pentagon.

This can be crudely specified as

...

- asked by Mr S 100 (23 votes), answered by MarcoB (21 votes)

—————————-

[Writing functions with ”Method” options] http://mathematica.stackexchange.com/questions/111666/writing-functions-with-method-options

I'd like to implement several behaviors for a particular function using a Method option added to the function definition:

- asked by dionys (14 votes), answered by Shutao TANG (7 votes)

—————————-

[Interpretation of the result of ?@] http://mathematica.stackexchange.com/questions/111394/interpretation-of-the-result-of

This might be a very trivial question but as a beginner, I don't know the answer. I was exploring ? and after running a cell containing ?@, I got an interesting result:

However, I'm not sure about ...

- asked by MathX (13 votes), answered by m_goldberg (15 votes)

—————————-

[Ticks in v10 - a bug or undocumented change] http://mathematica.stackexchange.com/questions/111663/ticks-in-v10-a-bug-or-undocumented-change

Bug introduced in 10.0 and fixed in 10.4

In this post @Heike provides this code:

ticksfun[xmin_, xmax_] :=

Table[{10^i, Superscript[10, i]}, {i, Floor[Log10[xmin]],

Ceiling[Log10[xmax]]}]

Table[{10^i, Superscript[10, i]}, {i, Floor[Log10[xmin]],

Ceiling[Log10[xmax]]}]

...

- asked by leosenko (12 votes), answered by rcollyer (8 votes)

—————————-

[Why is an empty list not tested by VectorQ?] http://mathematica.stackexchange.com/questions/111438/why-is-an-empty-list-not-tested-by-vectorq

It seems that the test itself is never applied and thus does not matter, so NumericQ or OddQ for ...

- asked by gwr (11 votes), answered by Szabolcs (16 votes)

—————————-

[Matrix indexed by one number] http://mathematica.stackexchange.com/questions/111631/matrix-indexed-by-one-number

I'm trying to find a generic way (for arbitrary dimensions) to create a matrix like so

a[1] a[2]

a[3] a[4]

i.e where it is indexed by one number, instead of say Array[a, 2, 2] which gives

...

- asked by Henrik (10 votes), answered by Szabolcs (14 votes)

—————————-

[ErrorListPlot ignores some exact data points] http://mathematica.stackexchange.com/questions/111436/errorlistplot-ignores-some-exact-data-points

Possible bug? Or am I missing something / expecting too much?

Forgive the seemingly obscure data points but they're where I've noticed a problem.

- asked by Quantum_Oli (9 votes)

[Generate two random numbers with constraints] http://mathematica.stackexchange.com/questions/97424/generate-two-random-numbers-with-constraints

I want to generate two random numbers, and , between and .

They are connected by the constraint .

How do I generate and ?

- asked by Chandan Datta (25 votes), answered by JasonB (11 votes)

—————————-

[Multivariable Taylor expansion does not work as expected] http://mathematica.stackexchange.com/questions/15023/multivariable-taylor-expansion-does-not-work-as-expected

The basic multivariable Taylor expansion formula around a point is as follows:

- asked by matheorem (24 votes), answered by Jens (29 votes)

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

[Numerical Optimal Control] http://mathematica.stackexchange.com/questions/111375/numerical-optimal-control

It seems that most practical optimal control problems are only able to be solved numerically using a non-linear programming approach. As such, I was hoping to tackle the following optimal control ...

- asked by user7388 (3 votes)

—————————-

[How to define a custom 3D graphics primitive in Mathematica?] http://mathematica.stackexchange.com/questions/111403/how-to-define-a-custom-3d-graphics-primitive-in-mathematica

There are lots of basic graphics pimitive in Mathematica such as 2D- caseLine[], Circle[] and 3D case Cylinder[], BSplineSurface[],etc.

In general, they own the following usage if memory serves:

...

- asked by Shutao TANG (5 votes)

—————————-

[Can Mathematica reliably determine the equality of any two constructible numbers?] http://mathematica.stackexchange.com/questions/111615/can-mathematica-reliably-determine-the-equality-of-any-two-constructible-numbers

A constructible number is any number which can be expressed with only natural numbers and the operators , , , , (square root only). Is Mathematica's Simplify or FullSimplify ...

- asked by Martin Buttner (3 votes)

[Is it possible to draw this figure using Mathematica?] http://mathematica.stackexchange.com/questions/110848/is-it-possible-to-draw-this-figure-using-mathematica

The figure is

See the how-to video or a speeded-up GIF.

I believe it should be possible to draw this figure programmatically using some Random function, but I'm rather new to Mathematica, so I ...

- asked by AccidentalFourierTransform (42 votes), answered by M.R. (65 votes)

—————————-

[Is there a simple strategy to determine whether a point is inside a boundary?] http://mathematica.stackexchange.com/questions/111114/is-there-a-simple-strategy-to-determine-whether-a-point-is-inside-a-boundary

For a ellipse , which owns the parametric equation as follows:

Now, I have a ...

- asked by Shutao TANG (17 votes), answered by RunnyKine (19 votes)

—————————-

[How to divide the wine into two equal portions] http://mathematica.stackexchange.com/questions/111250/how-to-divide-the-wine-into-two-equal-portions

There is a 8-liter bottle is full of wine. There are two empty bottles that have capacity 5-liters and 3-liters. How can these three bottles be used to separate the wine into two 4-liter portions?

...

- asked by yode (14 votes), answered by Simon Woods (21 votes)

—————————-

[solve this probability problem symbolically] http://mathematica.stackexchange.com/questions/110789/solve-this-probability-problem-symbolically

Consider a unit square, Pick two points P and Q uniformly at random inside the square, What is the probability that —PQ—¿1?

I tried solve this problem

...

- asked by mathe (11 votes), answered by ubpdqn (9 votes)

—————————-

[Radial distribution function] http://mathematica.stackexchange.com/questions/110743/radial-distribution-function

I have tried to rewrite my old IDL code to calculate the radial correlation function for a regular 2D crystal structure.

The theory behind this function is given here: ...

- asked by mrz (10 votes), answered by RunnyKine (11 votes)

—————————-

[How to plot GDPs in this way?] http://mathematica.stackexchange.com/questions/110901/how-to-plot-gdps-in-this-way

Actually the current answer is very wonderfull.The bouns just for someone can complete this question.

I found this interesting plot of how the relationship between the GDPs of different countries has ...

- asked by yode (10 votes), answered by C. E. (13 votes)

—————————-

[Interesting Progression of ParametricRegion: Bug?] http://mathematica.stackexchange.com/questions/110791/interesting-progression-of-parametricregion-bug

Consider the following ParametricRegion from an answer to this question:

region = ParametricRegion[{{(1 + r - 12 r^2 + 4 r^3)/(2 r - 2),

z Sqrt[(4 r^2)/(r - 1)^2 (r - r^2 (r - 3)^2)]},

2 ...

z Sqrt[(4 r^2)/(r - 1)^2 (r - r^2 (r - 3)^2)]},

2 ...

- asked by RunnyKine (10 votes)

[How do I clear all user defined symbols?] http://mathematica.stackexchange.com/questions/850/how-do-i-clear-all-user-defined-symbols

Is there some way to do this other than going to Evaluation

-> Quit kernel and firing a new one up?

-> Quit kernel and firing a new one up?

- asked by niklasfi (41 votes), answered by Artes (34 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 (126 votes), answered by Heike (105 votes)

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

[Overlay Inside a Grid/Column/Row Not Working] http://mathematica.stackexchange.com/questions/110836/overlay-inside-a-grid-column-row-not-working

Here is a microscopy image of some cells I want to make measurements on with Mathematica:

In order to make some measurements of cells in a microscopy image I have written a simple dynamic overlay ...

- asked by user13999 (3 votes)

—————————-

[WeightedAdjacencyMatrix does not complete for Connected Graph] http://mathematica.stackexchange.com/questions/111007/weightedadjacencymatrix-does-not-complete-for-connected-graph

Please see code snippet below - I have a weighted, connected graph that models a software process using a DiscreteMarkovProcess. I set some of the edge weights to zero to ”turn off” some of the ...

- asked by Chris Ruhl (3 votes)

—————————-

[Counting automorphisms that preserve a group action] http://mathematica.stackexchange.com/questions/111102/counting-automorphisms-that-preserve-a-group-action

Note: the math, I believe, is not the problem here. The issue is not that I get the wrong answer, just that my code does not terminate. So, if you do not feel comfortable with the problem below, I do ...

- asked by Gerald (5 votes)

[General techniques for creating complex animations] http://mathematica.stackexchange.com/questions/110190/general-techniques-for-creating-complex-animations

I love good animations of abstract concepts, and when I try to create them myself, I prefer doing so in code to make sure they are exact (and because some things are just way too fiddly to do by ...

- asked by Martin Buttner (23 votes), answered by LLlAMnYP (6 votes)

—————————-

[Is there a numerical method/built-in to calculate the boundary of a set of graphs?] http://mathematica.stackexchange.com/questions/110236/is-there-a-numerical-method-built-in-to-calculate-the-boundary-of-a-set-of-graph

Recently, I encounted a geometry problem in my work. For a curve-family that owns the following parametric equation:

...

- asked by Shutao TANG (13 votes), answered by RunnyKine (8 votes)

—————————-

[Creating 3D dice] http://mathematica.stackexchange.com/questions/110295/creating-3d-dice

How to create an image of a 3D die from the 2D images?

There is an example in the Documentation Center

I tried

but it doesn't work.

- asked by vito (13 votes), answered by Martin Buttner (20 votes)

—————————-

[Regression /Bug in DelaunayMesh from 10.3.1 to 10.4] http://mathematica.stackexchange.com/questions/110598/regression-bug-in-delaunaymesh-from-10-3-1-to-10-4

In answering this question, I realized the OP and I were obtaining different results from the alphaShapes2D code. This question was updated with additional point sets, but when I tried to use my ...

- asked by RunnyKine (12 votes)

—————————-

[Handling Kernel quit] http://mathematica.stackexchange.com/questions/110162/handling-kernel-quit

One can use $Epilog to do something when the Kernel is quit or put an end.m file next to the init.m.

For Wolfram System sessions, $Epilog is conventionally defined to read in a file named end.m.

...

- asked by Kuba (12 votes), answered by Mr.Wizard (7 votes)

—————————-

[What is the closest star to Earth other than the sun?] http://mathematica.stackexchange.com/questions/110559/what-is-the-closest-star-to-earth-other-than-the-sun

How to find the Sun's nearest neighbor star using Mathematica? I tried

but it didn't work

- asked by vito (10 votes), answered by Zviovich (26 votes)

—————————-

[Find the Panda - Dudolf panda puzzle] http://mathematica.stackexchange.com/questions/110497/find-the-panda-dudolf-panda-puzzle

I recently find this puzzle where you have to find the panda from a group of snowmen. Having a horrible eyesight I have to take help of mathematica to find it.

I start with assumption that all ...

- asked by Sumit (10 votes)

[How to make use of Associations?] http://mathematica.stackexchange.com/questions/52393/how-to-make-use-of-associations

I have been curious about it for long. Now that Mathematica 10 arrives, I think it's time to ask the question: How the new Association data structure would be used to improve Mathematica programming?

...

- asked by Yi Wang (105 votes), answered by Leonid Shifrin (125 votes)

—————————-

[Mathematica 10.0.x freezes in Initializing kernels] http://mathematica.stackexchange.com/questions/92931/mathematica-10-0-x-freezes-in-initializing-kernels

Bug caused by paclet update and fixed by paclet update.

I updated to Windows 10 and have been running Mathematica fine on it for over a month. For some reason, it has just stopped working. I don't ...

- asked by mitcheljh (67 votes), answered by ilian (84 votes)

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

[SiegelTheta gives misleading message when the dimensions don't match] http://mathematica.stackexchange.com/questions/110500/siegeltheta-gives-misleading-message-when-the-dimensions-dont-match

Bug introduced in 6.0 and persisting through 10.4

SiegelTheta is new in 6.0

In order to test the SiegelTheta function, I wanted to evaluate it for when

- asked by Semiclassical (3 votes)

—————————-

[How do I invert a function with two arguments?] http://mathematica.stackexchange.com/questions/110146/how-do-i-invert-a-function-with-two-arguments

I begin with a function defined by

I won't go into details because it comes from countless lines of partial differential equations, boundary conditions and perturbations. But suffice to ...

- asked by Ash Arsenault (2 votes)

—————————-

[Cell format for usage statements] http://mathematica.stackexchange.com/questions/110199/cell-format-for-usage-statements

The myFunc::usage statement is intended to be a simple summary of the symbol and its arguments. However, many users like myself opt out of using Workbench and prefer to maximize use of the Notebook ...

- asked by Robert (2 votes)

[General strategies to write big code in Mathematica?] http://mathematica.stackexchange.com/questions/109888/general-strategies-to-write-big-code-in-mathematica

I think after six months of exposure to Mathematica and the Wolfram Language I am fairly OK with writing short codes and snippets. However, what are some general strategies to use in order to write ...

- asked by Ali Hashmi (47 votes), answered by Leonid Shifrin (45 votes)

—————————-

[How to make the digits of Pi go around in a spiral like this?] http://mathematica.stackexchange.com/questions/109982/how-to-make-the-digits-of-%cf%80-go-around-in-a-spiral-like-this

Here is a start.

MapIndexed[Text[Reverse[First[RealDigits[Pi,10,252]]][[Tr@#2]],#]&,

Table[{t Cos[t],t Sin[t]},{t,0,16Pi,0.2}]]//Graphics

Table[{t Cos[t],t Sin[t]},{t,0,16Pi,0.2}]]//Graphics

- asked by mathe (32 votes), answered by Martin Buttner (40 votes)

—————————-

[Guidelines for planning custom GUI in Mathematica] http://mathematica.stackexchange.com/questions/109525/guidelines-for-planning-custom-gui-in-mathematica

Intro

Usually I don't have to care (it hurts my brain though) about misaligned details, additional/missing pixels. But currently I'm participating in a project where the design matters and I have to ...

- asked by Kuba (27 votes)

—————————-

[Wrong labelling of contours with ListContourPlot] http://mathematica.stackexchange.com/questions/109778/wrong-labelling-of-contours-with-listcontourplot

Bug introduced in 9.0 or earlier and persisting through 10.4

Consider this example:

Now pay special attention to ...

- asked by Szabolcs (16 votes), answered by Szabolcs (10 votes)

—————————-

[Fit image of mountain to gaussian] http://mathematica.stackexchange.com/questions/109946/fit-image-of-mountain-to-gaussian

I want to detect the edges of an image of a mountain and then fit that to a gaussian.

I am unsure about how to only get the mountain edge, rather than every single edge in the image.

How do I ...

- asked by olliepower (13 votes), answered by Dr. belisarius (13 votes)

—————————-

[What is a printer's point?] http://mathematica.stackexchange.com/questions/109813/what-is-a-printers-point

According to the documentation it is a basic unit for size spec. WindowSize and ImageSize says:

I think all the statements below are correct yet I would like to know for sure:

Is this the same ...

- asked by Kuba (12 votes), answered by Silvia (5 votes)

—————————-

[A weird issue with Interval[$MaxNumber]] http://mathematica.stackexchange.com/questions/109597/a-weird-issue-with-intervalmaxnumber

From the Interval documentation:

For approximate machine- or arbitrary-precision numbers x, Interval[x] yields an interval reflecting the uncertainty in x.

- asked by Vladimir Reshetnikov (12 votes), answered by The Vee (3 votes)

- asked by noisy (43 votes), answered by Vitaliy Kaurov (23 votes)

—————————-

[Is Mathematica worth it for me?] http://mathematica.stackexchange.com/questions/100072/is-mathematica-worth-it-for-me

I'm 13 years old and in 7th grade. I'm currently in Algebra 1, and I have fallen in love with both math and programming.

When I came upon Mathematica, it was awesome. My two favorite things fused ...

- asked by TreFox (59 votes), answered by Pillsy (43 votes)

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

[Building a classifier for images] http://mathematica.stackexchange.com/questions/109484/building-a-classifier-for-images

I tried to build a classifier for some images that I have with the following code:

...

- asked by soandos (2 votes)

—————————-

[AppearanceRules on multipage Web Form] http://mathematica.stackexchange.com/questions/109887/appearancerules-on-multipage-web-form

I'm attempting to make a web survey using FormFunction. To list the questions I am using AppearanceRules to give each page an individual title. I can't find any documentation in regards to ...

- asked by Alex Krotz (4 votes)

—————————-

[Function output] http://mathematica.stackexchange.com/questions/109714/function-output

I would like a function that computes Cartesian product of two

sets z=(Tuples@{#1,#2}), and computes the number of elements in this set(list)

Length@z which have a x elements in #1 and y elements in ...

sets z=(Tuples@{#1,#2}), and computes the number of elements in this set(list)

Length@z which have a x elements in #1 and y elements in ...

- asked by Gelios (2 votes)

[How to design CloudObjects with reasonable CloudCredit costs] http://mathematica.stackexchange.com/questions/109259/how-to-design-cloudobjects-with-reasonable-cloudcredit-costs

Note: I originally thought to post this as a non-answer/extended comment to this question; however I feared that I would end up hijacking the original question. It is likely a duplicate with the ...

- asked by bobthechemist (17 votes)

—————————-

[How to merge two screenshots into one image?] http://mathematica.stackexchange.com/questions/109196/how-to-merge-two-screenshots-into-one-image

I have two screenshots:

For a long screenshot picture I usually use PhotoShop to combine both images:

How do I use Mathematica to make an automated program to do this? This is my current ...

- asked by yode (13 votes), answered by Arnoud Buzing (13 votes)

—————————-

[Current (e.g., ca. 2016 / MMa 10 / WP 4+) best practices for embedding interactive content in WordPress?] http://mathematica.stackexchange.com/questions/109231/current-e-g-ca-2016-mma-10-wp-4-best-practices-for-embedding-interacti

My strategy, in the past, has been to embed interactive CDF files into my WordPress blog for student's to use (Much like the Wolfram Demonstration Project).

As many know 1) the 'Plug in' ...

- asked by flip (11 votes)

—————————-

[Getting data from FRED] http://mathematica.stackexchange.com/questions/109203/getting-data-from-fred

Mathematica V10.4 supports a service for connection to FRED. If you create a connection with

(you need to have created a login id to be ...

- asked by George Wolfe (11 votes), answered by George Wolfe (4 votes)

—————————-

[Do[ ]s and Don't[ ]s when teaching Mathematica in undergraduate courses] http://mathematica.stackexchange.com/questions/108987/do-s-and-dont-s-when-teaching-mathematica-in-undergraduate-courses

Question motivated by some horrific homework-related posts that I don't dare to link:

What are the top Do's and Dont's when teaching Mathematica to undergrads?

I don't ask for the design of a ...

- asked by Dr. belisarius (11 votes), answered by bobthechemist (10 votes)

—————————-

[Primes Race (Mathematica Efficiency)] http://mathematica.stackexchange.com/questions/108798/primes-race-mathematica-efficiency

I am currently working with a paper that deals with this concept of Prime Races. You essentially create a large list of prime numbers and then split that list into two teams. You are assigned to ...

- asked by Dops (10 votes), answered by bbgodfrey (6 votes)

—————————-

[Gathering of list] http://mathematica.stackexchange.com/questions/109104/gathering-of-list

Problem statement

The following challenge was recently posted to the J language programming forum by Skip Cave http://jsoftware.com/pipermail/programming/2016-March/044561.html

”The animal ...

- asked by murray (9 votes), answered by J. M. (13 votes)

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

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

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

- asked by xslittlegrass (35 votes), answered by Jens (38 votes)

—————————-

I'm new to Mathematica, and I'm finding it difficult to plot an ellipse. I tried using

but I'm getting some errors. Is there something wrong ...

- asked by Sriram (4 votes), answered by Jens (12 votes)

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

[Mimicking Console and Output Matlab/Rstudio-Style Environment in Mathematica?] http://mathematica.stackexchange.com/questions/109179/mimicking-console-and-output-matlab-rstudio-style-environment-in-mathematica

I am trying to crudely approximate the RStudio or Matlab Workspace environment in Mathematica by having a specific notebook function as the ”console notebook” where I execute commands and another ...

- asked by user13999 (6 votes)

—————————-

[What is the equivalent of $ModuleNumber for DynamicModule] http://mathematica.stackexchange.com/questions/108850/what-is-the-equivalent-of-modulenumber-for-dynamicmodule

Mathematica provides access to $ModuleNumber which can be enormously useful.

Unfortunately I can't find the equivalent for DynamicModule.

I know such a parameter must exist for two reasons:

First, ...

- asked by MB1965 (8 votes)

—————————-

[Why this expression is not evaluated correctly?] http://mathematica.stackexchange.com/questions/109310/why-this-expression-is-not-evaluated-correctly

Look at the following code:

f[kx_, ky_] := -1*(Exp[I*kx] + 2*Exp[-I*kx/2]*Cos[Sqrt[3]*ky/2]);

H = {{1, f[kx, ky]}, {Conjugate[f[kx, ky]], -1}};

D[Norm[Normalize[Eigensystem[H][[2]][[1]]]], kx] /. {kx ...

H = {{1, f[kx, ky]}, {Conjugate[f[kx, ky]], -1}};

D[Norm[Normalize[Eigensystem[H][[2]][[1]]]], kx] /. {kx ...

- asked by Chong Wang (1 vote)

[Typoglycemia text manipulation] http://mathematica.stackexchange.com/questions/108563/typoglycemia-text-manipulation

I was just reading the article: https://en.wikipedia.org/wiki/Typoglycemia

”... readers can understand the meaning of words in a sentence even when the interior letters of each word are scrambled ...

- asked by mrz (20 votes), answered by J. M. (15 votes)

—————————-

[Version inconsistency with optional arguments: what if the default value doesn't match the pattern?] http://mathematica.stackexchange.com/questions/108636/version-inconsistency-with-optional-arguments-what-if-the-default-value-doesnt

I just came across some weird behaviour. Take this function definition:

The default value of vs is All. Now think about what f[] should return. Should it ...

- asked by Szabolcs (18 votes), answered by Mr.Wizard (12 votes)

—————————-

[Reproducing a ranking function that behaves like Excel's RANK] http://mathematica.stackexchange.com/questions/108309/reproducing-a-ranking-function-that-behaves-like-excels-rank

I tried to find a function or expression in Mathematica that produces the same output as the RANK function in Excel (see its description here), but unfortunately I could not find an existing one.

For ...

- asked by M.Basel (14 votes), answered by TomD (18 votes)

—————————-

[Given a large binary matrix, find the largest submatrix containing non-zero elements] http://mathematica.stackexchange.com/questions/108299/given-a-large-binary-matrix-find-the-largest-submatrix-containing-non-zero-elem

I'm looking for a way to reduce a binary matrix containing zeros at some positions into a matrix that contains no zeros by deleting rows and columns of the original matrix until only non-zero values ...

- asked by tavr (13 votes), answered by unlikely (4 votes)

—————————-

[Generating a list of numbers that are not multiples of 4] http://mathematica.stackexchange.com/questions/108502/generating-a-list-of-numbers-that-are-not-multiples-of-4

I want to write simple code that will list all numbers from to that are not multiples of .

And in this case I consider that

- asked by Mariam (12 votes), answered by Mr.Wizard (15 votes)

—————————-

[Can Mathematica convert a RegularExpression into a StringExpression or vice-versa?] http://mathematica.stackexchange.com/questions/108481/can-mathematica-convert-a-regularexpression-into-a-stringexpression-or-vice-vers

I know that Mathematica can perform string comparison using either StringExpression or RegularExpression. Although regular expressions are more common, I feel that the Mathematica StringExpressions ...

- asked by Denis Cousineau (12 votes)

—————————-

[What options and settings can be used to create print quality typeset documents with Mathematica?] http://mathematica.stackexchange.com/questions/108553/what-options-and-settings-can-be-used-to-create-print-quality-typeset-documents

If I am proficient on dedicated typesetting software (e.g. LaTeX) it makes sense to use that for typesetting but if I am not how can I use Mathematica to create good quality documents.

The question ...

- asked by Mike Honeychurch (11 votes), answered by Mike Honeychurch (17 votes)

[1 Plot, 2 Scale/Axis] http://mathematica.stackexchange.com/questions/627/1-plot-2-scale-axis

I would like to plot those two datasets on top of each other. But they have very different range on the axis. How can I have two different axis?

I found the following on the help menu but quite ...

- asked by 500 (97 votes), answered by ArgentoSapiens (92 votes)

—————————-

[Generating a Sierpinski carpet] http://mathematica.stackexchange.com/questions/22052/generating-a-sierpinski-carpet

I am trying to draw a Sierpinski_carpet. I have code that works, but I think there is a more elegant way to do than my way. Maybe I couls use Tuples or Permutations or some similar function to ...

- asked by chyaong (43 votes), answered by Mr.Wizard (66 votes)

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

[Prepending a sequence with zeros gives ‘FindGeneratingFunction‘ hard time] http://mathematica.stackexchange.com/questions/108451/prepending-a-sequence-with-zeros-gives-findgeneratingfunction-hard-time

Asking for

FindGeneratingFunction[{1, 3, 11, 43, 171, 683, 2731, 10923, 43691, 174763}, t]

gives the answer (namely (1 - 2 t)/(1 - 5 t + 4 t^2)) almost immediately.

However if I prepend zeros in ...

gives the answer (namely (1 - 2 t)/(1 - 5 t + 4 t^2)) almost immediately.

However if I prepend zeros in ...

- asked by (3 votes)

—————————-

[Obtaining a Previously Constructed Function as Desired Output] http://mathematica.stackexchange.com/questions/108373/obtaining-a-previously-constructed-function-as-desired-output

I was playing around with some Generalized Trigonometric Functions defined as follows;

...

- asked by Eleven-Eleven (3 votes)

—————————-

[The implementation of FunctionRange] http://mathematica.stackexchange.com/questions/108308/the-implementation-of-functionrange

How exactly does the FunctionRange work? What kind of algorithm does it use? I looked it up in the manual but it doesn't provide any references or even a name of the algorithm.

It also accepts a ...

- asked by pwl (3 votes)

[++ is dangerous for C programmers] http://mathematica.stackexchange.com/questions/107619/is-dangerous-for-c-programmers

I noticed this fact, that may be misleading for programmers used to C language.

In Mathematica, if you have a function f[] and an array v, and you write

the function f is called ...

- asked by Giovanni Resta (30 votes), answered by Mr.Wizard (23 votes)

[Apply multiple functions to same list] http://mathematica.stackexchange.com/questions/107721/apply-multiple-functions-to-same-list

I'd like to get the Min, Max, Median, Mean, etc. for the same list. For now I'm doing the following:

It seems ...

- asked by Mitchell Kaplan (15 votes), answered by Bob Hanlon (18 votes)

—————————-

[How do I delete all items that occur more than once?] http://mathematica.stackexchange.com/questions/107483/how-do-i-delete-all-items-that-occur-more-than-once

DeleteDuplicates works fine but leaves a single copy of the duplicated item.

I need to remove all items that occur more than once i.e.

{{1,2},{1,2},{3,4}} -> {3,4}. There must be a one-liner.

I need to remove all items that occur more than once i.e.

{{1,2},{1,2},{3,4}} -> {3,4}. There must be a one-liner.

- asked by Boris (12 votes), answered by Leonid Shifrin (16 votes)

[Puzzle with Mathematica] http://mathematica.stackexchange.com/questions/107859/puzzle-with-mathematica

Hello everyone, This is a puzzle I got from someone via social media. Basically, we need to fill up the boxes with the numbers 1-9 (no repetitions) that fit the multiplication and addition ...

- asked by iFikr (11 votes), answered by unlikely (13 votes)

[Finite Element Method and ElementMeshInterpolation issue in v10.3] http://mathematica.stackexchange.com/questions/107668/finite-element-method-and-elementmeshinterpolation-issue-in-v10-3

I recently installed Mathematica v10.3 and checked a project I was working on few months ago under Mathematica v10.1.

In this project I solve a PDE with NDSolve and Finite Element Method over a 2D ...

- asked by unlikely (10 votes), answered by Jason B (8 votes)

[Efficient way to make subsets of list with placeholders] http://mathematica.stackexchange.com/questions/107517/efficient-way-to-make-subsets-of-list-with-placeholders

I have an arbitrary list of unique elements:

lst = {a, b, c, d}

Documentation allows finding subsets with same number of elements, say 2:

Subsets[lst, {2}]

(* {{a, b}, {a, c}, {a, d}, {b, c}, {b, ...

Documentation allows finding subsets with same number of elements, say 2:

Subsets[lst, {2}]

(* {{a, b}, {a, c}, {a, d}, {b, c}, {b, ...

- asked by garej (10 votes), answered by Dr. belisarius (10 votes)

[Double Sum Involving Condition] http://mathematica.stackexchange.com/questions/107652/double-sum-involving-condition

I would like to compute the dimensions of some small free nilpotent Lie algebras. However, I am totally new to this and I could not figure out how to write the double sum which gives the dimension of ...

- asked by Can Hatipoglu (9 votes), answered by J. M. (13 votes)

[Why round to even integers?] http://mathematica.stackexchange.com/questions/2116/why-round-to-even-integers

According to the Mathematica help: Round rounds numbers of the form x.5 toward the nearest even integer.

For example:

Round[0.5, 1.5, 2.5, 3.5, 4.5]

gives

0, 2, 2, 4, 4

What's the ...

- asked by wxffles (42 votes), answered by Per Alexandersson (27 votes)

[Calling Correct Function for Plotting DiracDelta] http://mathematica.stackexchange.com/questions/3506/calling-correct-function-for-plotting-diracdelta

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a function or just the function ...

- asked by night owl (11 votes), answered by Heike (13 votes)

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

[How many clusters does DominantColors return?] http://mathematica.stackexchange.com/questions/107842/how-many-clusters-does-dominantcolors-return

Is there any documentation on how it automatically chooses the number of colors - does it use X-means?

- asked by M.R. (3 votes)

[Using GNU Make to compile MathLink program automatically removes a file] http://mathematica.stackexchange.com/questions/107863/using-gnu-make-to-compile-mathlink-program-automatically-removes-a-file

It's possible that this question belongs on Stackoverflow; however, the Mathematica context may be important so I'm asking here first.

I am working on a project to interact with sensors connected to ...

- asked by bobthechemist (1 vote)

[Why does Solve work in v9.0.1 but not in v10.3.1] http://mathematica.stackexchange.com/questions/107585/why-does-solve-work-in-v9-0-1-but-not-in-v10-3-1

I want to solve the following DE

sol2 ...

- asked by xpaul (4 votes)

[Why does Mathematica report that = ?] http://mathematica.stackexchange.com/questions/106162/why-does-mathematica-report-that-int-1-infty-frac-sin-sqrtx-sqrtxdx

Bug introduced in 7.0 or earlier and persisting through 10.3.1 or later

Mathematica 10 gives the following very odd result,

which seems ...

- asked by JEM (30 votes)

—————————-

[How was Mathematica built?] http://mathematica.stackexchange.com/questions/106020/how-was-mathematica-built

I've been wondering this for a while now: How was Mathematica built?

Is it written in Haskell? C++? I'd love to get a taste of the wizardry behind this incredible software.

- asked by Chet (14 votes), answered by Sjoerd C. de Vries (19 votes)

—————————-

[How can one manually change the rule ordering] http://mathematica.stackexchange.com/questions/106068/how-can-one-manually-change-the-rule-ordering

I have a function which has some general behaviour, but that should act on some specific kinds of objects in some other way. I know that Mathematica is supposed to automatically order the rules so ...

- asked by Lior Blech (14 votes), answered by Mr.Wizard (15 votes)

—————————-

[What governs images resizing in the FrontEnd environment] http://mathematica.stackexchange.com/questions/106204/what-governs-images-resizing-in-the-frontend-environment

What is responsible for the middle Row images' size? And why single image row is different?

I know I can prevent that with mapping ...

- asked by Kuba (13 votes), answered by Jason B (9 votes)

—————————-

[How to report a bug in Mathematica] http://mathematica.stackexchange.com/questions/106227/how-to-report-a-bug-in-mathematica

I found two bugs in Mathematica (10.3 and 10.1) and I need to report it. Is there any tools to do that or section on Wolfram website?

- asked by Developer2000 (12 votes), answered by Szabolcs (17 votes)

—————————-

[Reproduce image effect in Mathematica] http://mathematica.stackexchange.com/questions/106165/reproduce-image-effect-in-mathematica

How do I create the ”dotifying” effect below in Mathematica?

I have tried to use Rasterize first to get the image pixelated, but how do I get the disc/circle pattern then?

- asked by macurie (12 votes), answered by rhermans (17 votes)

—————————-

[How to make a Cahn–Hilliard model GIF] http://mathematica.stackexchange.com/questions/106333/how-to-make-a-cahn-hilliard-model-gif

The question derived from @Jason B 's answer.I wanna make it but don't how to do. But we can get some rule about the GIF

The change of the total pixel is very small.

- asked by yode (10 votes), answered by MarcoB (15 votes)

[Generating visually pleasing circle packs] http://mathematica.stackexchange.com/questions/40334/generating-visually-pleasing-circle-packs

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did.

I would like to ...

- asked by VividD (89 votes), answered by level1807 (53 votes)

—————————-

[How to calculate contour integrals with Mathematica?] http://mathematica.stackexchange.com/questions/34073/how-to-calculate-contour-integrals-with-mathematica

How to calculate the integral of over the unit circle counterclockwise for each branch of the integrand?

- asked by user64494 (20 votes), answered by Artes (39 votes)

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

[Extracting control points from BezierFunction] http://mathematica.stackexchange.com/questions/107435/extracting-control-points-from-bezierfunction

given a Bezier surface, is there a simple way to express (from the First fundamental form) again in Bezier form?

More precisely, I have control points and a Bezier function :

- asked by Osmihran (1 vote)

—————————-

[Order of importing data from files] http://mathematica.stackexchange.com/questions/106296/order-of-importing-data-from-files

I have many text files numbered from 1 to 1 million in numerical order. Within each text file is 5 columns of data (TAB spaced) with many rows. I effectively want to take the minimum value from each ...

- asked by David (1 vote)

—————————-

[WolframScript Unix - Script Parameters on Raspberry Pi] http://mathematica.stackexchange.com/questions/107436/wolframscript-unix-script-parameters-on-raspberry-pi

I'm currently trying to run a script with 2 parameters which gets called via a BASH script. The script runs fine however the list of passed parameters , $ScriptCommandLine, always stays empty.

...

- asked by TheCheatsrichter (2 votes)

[Partitioning a list when the cumulative sum exceeds 1] http://mathematica.stackexchange.com/questions/105792/partitioning-a-list-when-the-cumulative-sum-exceeds-1

I have a long list of say 1 million Uniform(0,1) random numbers, such as:

I want to partition this list whenever the cumulative ...

- asked by wolfies (15 votes), answered by Mr.Wizard (18 votes)

—————————-

[How to extract a contour line (or a region) from a ContourPlot?] http://mathematica.stackexchange.com/questions/105750/how-to-extract-a-contour-line-or-a-region-from-a-contourplot

Given a ContourPlot with a set of contours, say, this:

is it possible to get the contours separating domains with the different colors in the form of lists?

For example, how to extract the ...

- asked by Alexei Boulbitch (12 votes), answered by Michael E2 (7 votes)

—————————-

[Using NDSolve to find particle trajectory] http://mathematica.stackexchange.com/questions/105859/using-ndsolve-to-find-particle-trajectory

I'm trying to simulate a particle in an electric and magnetic fields, but numerically instead of analytically. This is basically solving the equation

- asked by triplebig (11 votes), answered by Sjoerd C. de Vries (11 votes)

—————————-

[why MatchQ is fast and Replace slow?] http://mathematica.stackexchange.com/questions/105626/why-matchq-is-fast-and-replace-slow

Consider a large expression, say a polynomial with 25 terms

to which you apply the following replacement rule:

Since f ...

- asked by M. Tissier (11 votes), answered by Mr.Wizard (13 votes)

—————————-

[Use of some functions of the Developer Utility Package, such as BesselSimplify] http://mathematica.stackexchange.com/questions/105643/use-of-some-functions-of-the-developer-utility-package-such-as-besselsimplify

The Developer Utilities Package contains several functions that look interesting:

However for each ...

- asked by Alexei Boulbitch (10 votes), answered by Jens (5 votes)

—————————-

[Plot of is missing from ] http://mathematica.stackexchange.com/questions/105774/plot-of-sinxx-is-missing-from-x-143

When plotting the graph of I noticed that there is no plot from about . I don't suppose there is a purely mathematical explanation for this?

So, why is there no graph in ...

- asked by Imre Vegh (10 votes), answered by MarcoB (22 votes)

—————————-

[Brackets around each item in matrix] http://mathematica.stackexchange.com/questions/105864/brackets-around-each-item-in-matrix

I have a matrix where every item in the matrix has its own brackets that I do not want. How can I remove the brackets around each item?

- asked by C. Tamaro (8 votes), answered by John Conor Cosnett (9 votes)

[How do I clear all user defined symbols?] http://mathematica.stackexchange.com/questions/850/how-do-i-clear-all-user-defined-symbols

Is there some way to do this other than going to Evaluation -> Quit kernel and firing a new one up?

- asked by niklasfi (37 votes), answered by Artes (31 votes)

—————————-

[Drawing a square root spiral] http://mathematica.stackexchange.com/questions/66969/drawing-a-square-root-spiral

Here is a start. I'm looking for a nice way to draw it.

Graphics[{EdgeForm[Black], White,

Polygon @ {{0, 0}, {-1, 0},

Sqrt[2] {Cos[#], Sin[#]} &[Pi - (ArcCot[1])]},

Polygon @ {{0, ...

Polygon @ {{0, 0}, {-1, 0},

Sqrt[2] {Cos[#], Sin[#]} &[Pi - (ArcCot[1])]},

Polygon @ {{0, ...

- asked by mathe (22 votes), answered by Bob Hanlon (17 votes)

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

[Weird behaviour for a vector InterpolatingFunction inside an NDSolve] http://mathematica.stackexchange.com/questions/105594/weird-behaviour-for-a-vector-interpolatingfunction-inside-an-ndsolve

I have run into some weird behaviour on the part of NDSolve which I find pretty bizarre and which I would like to understand better.

Suppose, for the sake of argument, that I want to study the ODE ...

- asked by Emilio Pisanty (3 votes)

—————————-

[NDeigensystem returns error due to mesh discretization when calculating vibrations of a cantilever] http://mathematica.stackexchange.com/questions/105840/ndeigensystem-returns-error-due-to-mesh-discretization-when-calculating-vibratio

There was an transcription error in the code I provided in a previous post:

NDeigensystem returns complex non-hermitian error for the calculation of vibrations of a cantilever

This resulted in it ...

- asked by user37299 (2 votes)

—————————-

[WhenEvent and Resetting of Variable in PDE when operation succeeds] http://mathematica.stackexchange.com/questions/105781/whenevent-and-resetting-of-variable-in-pde-when-operation-succeeds

I have had success in using WhenEvent to reset or change a variable within NDSolve with ordinary differential equations. My working, functioning MWE is:

- asked by drN (3 votes)

[Exponential fitting - isn't actually a BUG there?] http://mathematica.stackexchange.com/questions/105002/exponential-fitting-isnt-actually-a-bug-there

There are many questions on this site about wrong exponential fitting in Mathematica but no one considers this well-known problem as a potential bug. Usually people suggest well-known workarounds ...

- asked by Alexey Popkov (20 votes), answered by Sjoerd C. de Vries (6 votes)

—————————-

[Detecting components in timeseries] http://mathematica.stackexchange.com/questions/104950/detecting-components-in-timeseries

I'm looking at this sequence of values:

I'd like to detect the points where the center of the time-series shifts (around x=1000 and x=2000). Many of the transforms and smoothing methods I have ...

- asked by M.R. (17 votes), answered by blochwave (22 votes)

—————————-

[Generating Tuples with restrictions] http://mathematica.stackexchange.com/questions/105139/generating-tuples-with-restrictions

I am interested in a certain subset of all tuples. Generating all with Tuples and then filtering is wasteful, and will ”blow up” very quickly.

For a concrete example, let's say I want to find all ...

- asked by Kiro (13 votes), answered by Kuba (12 votes)

—————————-

[Grid cuts my images] http://mathematica.stackexchange.com/questions/105061/grid-cuts-my-images

Bug introduced in V9.0 or earlier

and persisting through V10.3.1 or later

This is just ...

- asked by Kuba (11 votes), answered by Coolwater (7 votes)

—————————-

[Non Standard Eigenfunction Plots of the Laplacian Over the Unit Square] http://mathematica.stackexchange.com/questions/105264/non-standard-eigenfunction-plots-of-the-laplacian-over-the-unit-square

I have recently been plotting eigenfunctions of the laplacian over the unit square using the NDEigensystem command. However, I have noticed something in the plots which puzzles me.

Below is an image ...

- asked by Mr S 100 (11 votes), answered by Jens (12 votes)

—————————-

[How to count the number of the tube] http://mathematica.stackexchange.com/questions/105229/how-to-count-the-number-of-the-tube

There is a picture Get the binary image

binimg = ColorSeparate[img][[2]] // Binarize[#, 0.25] & // Thinning

Visulize the result of regconization

lines = ImageLines[binimg, 0.074];

...

Visulize the result of regconization

lines = ImageLines[binimg, 0.074];

...

- asked by yode (11 votes), answered by nikie (7 votes)

—————————-

[Detecting X or O in a small image] http://mathematica.stackexchange.com/questions/105327/detecting-x-or-o-in-a-small-image

I am making a robot that plays Tic Tac Toe

Currently, I have code that will parse the board and separate it into an array of 9 images, each space on the board. How can I detect if the image ...

- asked by Jenny (10 votes), answered by John Conor Cosnett (17 votes)

[Is there a syntax for single-line comments for notebooks?] http://mathematica.stackexchange.com/questions/1496/is-there-a-syntax-for-single-line-comments-for-notebooks

I'm aware that I can use (* ... *) to comment out stuff in a notebook. Many languages have a syntax for single-line comments, such as

For ...

- asked by Peeter Joot (37 votes), answered by Szabolcs (43 votes)

—————————-

[Advice for Mathematica as Mathematician's Aid] http://mathematica.stackexchange.com/questions/92686/advice-for-mathematica-as-mathematicians-aid

I use Mathematica mainly as an aid in symbolic attacks on problems, usually intermediate or harder and often number theoretic. While Reduce, Simplify, et al. are remarkably powerful, they of course ...

- asked by CarlEdman (56 votes), answered by MarcoB (39 votes)

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

[What are the time and space complexities of Classify/Predict?] http://mathematica.stackexchange.com/questions/105366/what-are-the-time-and-space-complexities-of-classify-predict

Does anyone have knowledge of the O(n) time and space complexities for various model types supported by Classify[] and Predict[] during training and evaluation?

Here are a list of supported model ...

- asked by M.R. (4 votes)

—————————-

[Finding eigenvalues in Mathematica: why so slow?] http://mathematica.stackexchange.com/questions/105224/finding-eigenvalues-in-mathematica-why-so-slow

I am trying to find the eigensystem of a large sparse real symmetric matrix, and I only need the lowest 40 or so eigenstates. The relevant code is as follows:

- asked by Xiao (3 votes)

—————————-

[Notebook created in cloud has odd errors in Mathematica 10.3.1] http://mathematica.stackexchange.com/questions/105019/notebook-created-in-cloud-has-odd-errors-in-mathematica-10-3-1

I've downloaded a notebook from develop.wolframcloud.com and opened it in 10.3.1 (running on Win 10). When I evaluate some cells I get syntax errors along the lines of...

- asked by Ymareth (2 votes)

[List of Mathematica related acronyms and their real meaning] http://mathematica.stackexchange.com/questions/104593/list-of-mathematica-related-acronyms-and-their-real-meaning

A few years ago, Wolfram Inc. not only started to rename things around Mathematica, a lot of new technologies and frameworks were introduced as well. Now, we are left with a lot of acronyms and ...

- asked by halirutan (37 votes), answered by halirutan (38 votes)

—————————-

[What would you ask Mathematica to do on a big system?] http://mathematica.stackexchange.com/questions/104842/what-would-you-ask-mathematica-to-do-on-a-big-system

Our hardware supplier has given us the opportunity to test Mathematica on a big Windows system. The specs will be 1 to 4 TB of working memory and 12 sockets with 18 cores each. I got 1 full week of ...

- asked by pvanbijnen (25 votes), answered by David G. Stork (9 votes)

—————————-

[What algorithm do the Compress and Uncompress functions use?] http://mathematica.stackexchange.com/questions/104660/what-algorithm-do-the-compress-and-uncompress-functions-use

Compress and Uncompress are used internally by Mathematica to compress things like 3D data in notebook files - data that I'd like to read independently. Does anyone have any idea if the compression ...

- asked by Andy C. (12 votes), answered by Mark Adler (13 votes)

—————————-

[Is there any predictor-corrector method in Mathematica for solving nonlinear system of algebraic equations?] http://mathematica.stackexchange.com/questions/104578/is-there-any-predictor-corrector-method-in-mathematica-for-solving-nonlinear-sys

The FindRoot Function in Matheatica can easily be used to solve systems of nonlinear algebraic equations. But, I want to solve a system of nonlinear equations with variations of some parameters.

...

- asked by hesam (12 votes), answered by Chris K (9 votes)

—————————-

[How do I define a periodic region?] http://mathematica.stackexchange.com/questions/104723/how-do-i-define-a-periodic-region

I'm trying to create a region of ”thick” grid-lines, like so

GRID = ImplicitRegion[((0 <= x <= 1 || 2 <= x <= 3 || 4 <= x <= 5 || 6 <= x <= 7 ||

8 <= x <= 9) || (0 ...

8 <= x <= 9) || (0 ...

- asked by Zorngo (12 votes), answered by Kuba (10 votes)

—————————-

[Zoom in on a 2D graph] http://mathematica.stackexchange.com/questions/104718/zoom-in-on-a-2d-graph

I have seen many queries on zooming in on plots etc. But I haven't seen any regarding 2D graphs. For eg if I have a graph like

It will create a graph. I have a ...

- asked by vikram reddy (10 votes), answered by Kuba (11 votes)

—————————-

[Fitting a curve to an image object: not a superellipse, not an egg curve.. what else?] http://mathematica.stackexchange.com/questions/104419/fitting-a-curve-to-an-image-object-not-a-superellipse-not-an-egg-curve-what

I'm facing the problem of quantifying the morphology of objects with such a shape (nannoconids...

they are fossils).

One of the final goals is to produce a solid of revolution and compute ...

- asked by Stefano (9 votes), answered by nikie (9 votes)

Here is a start. I'm looking for a nice way to draw it.

Polygon @ {{0, 0}, {-1, 0},

Sqrt[2] {Cos[#], Sin[#]} &[Pi - (ArcCot[1])]},

Polygon @ {{0, ...

- asked by mathe (22 votes), answered by Bob Hanlon (17 votes)

—————————-

[Advice for Mathematica as Mathematician's Aid] http://mathematica.stackexchange.com/questions/92686/advice-for-mathematica-as-mathematicians-aid

I use Mathematica mainly as an aid in symbolic attacks on problems, usually intermediate or harder and often number theoretic. While Reduce, Simplify, et al. are remarkably powerful, they of course ...

- asked by CarlEdman (56 votes), answered by MarcoB (39 votes)

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

[Way to make contour labels on SliceContourPlot3D?] http://mathematica.stackexchange.com/questions/104590/way-to-make-contour-labels-on-slicecontourplot3d

SliceContourPlot3D doesn't seem to come with the option of putting contour labels on the plots as far as I can see. I'm using the XStackedPlanes option. I don't see any information about how one might ...

- asked by Eli Morris (4 votes)

—————————-

[Implementation of a matrix formula] http://mathematica.stackexchange.com/questions/104463/implementation-of-a-matrix-formula

For the Bezier surface, which owns the following matrix definition:

where, denotes Bernstein-basis.

- asked by Shutao TANG (2 votes)

—————————-

[Can one preserve the appearance of the HorizontalGauge?] http://mathematica.stackexchange.com/questions/104524/can-one-preserve-the-appearance-of-the-horizontalgauge

I use sometimes the HorizontalGauge instead of a slider in Manipulateor instead of the ProgressIndicator. I find it very convenient, since it gives quantitative information on the status of the ...

- asked by Alexei Boulbitch (3 votes)

[Partition a list based on specific elements? Grab the sublists beginning with a certain marker elements] http://mathematica.stackexchange.com/questions/104153/partition-a-list-based-on-specific-elements-grab-the-sublists-beginning-with-a

Say I have the list

I would like to make sublists of everything beginning with the a element till ...

- asked by Jason B (11 votes), answered by Kuba (14 votes)

—————————-

[Why does Outer sometimes return a packed array, and sometimes not?] http://mathematica.stackexchange.com/questions/104040/why-does-outer-sometimes-return-a-packed-array-and-sometimes-not

For example

In[342]:=

test3 = Flatten[Outer[Plus, Range[1000], Range[1000]],

1]; // AbsoluteTiming

Out[342]= {0.0198735, Null}

test3 = Flatten[Outer[Plus, Range[1000], Range[1000]],

1]; // AbsoluteTiming

Out[342]= {0.0198735, Null}

returns PackedArray (examined by Developer‘PackedArrayQ[test3] ...

- asked by matheorem (10 votes), answered by Mr.Wizard (7 votes)

—————————-

[Interpolation function way off] http://mathematica.stackexchange.com/questions/104037/interpolation-function-way-off

I have a simple list of data points to which I would like to fit an interpolation function. However, the results given by Interpolation[] gives an oscillating function which is not warranted by the ...

- asked by Philo (9 votes), answered by Szabolcs (14 votes)

—————————-

[How to deal with bad arguments when a function's UpValues is a pure-function?] http://mathematica.stackexchange.com/questions/103952/how-to-deal-with-bad-arguments-when-a-functions-upvalues-is-a-pure-function

In practice, I needs to define the UpValues of a user-defined function. For instance, the operation of function like differential formula , expansion and so on.

Here, I will give a example that came ...

- asked by Shutao TANG (8 votes), answered by Mr.Wizard (2 votes)

—————————-

[Using Solve to solve the equation ] http://mathematica.stackexchange.com/questions/104281/using-solve-to-solve-the-equation-x1-3-1

I am curious why this command returned no answers:

Solve[x^(1/3) == -1, x]

Gives this output:

(* {} *)

I was able to get around the problem with this:

Solve[Surd[x, 3] == -1, x]

Which ...

Gives this output:

(* {} *)

I was able to get around the problem with this:

Solve[Surd[x, 3] == -1, x]

Which ...

- asked by David (8 votes), answered by Jens (13 votes)

—————————-

[How do you convert RGBColor to an HTML-style string?] http://mathematica.stackexchange.com/questions/103999/how-do-you-convert-rgbcolor-to-an-html-style-string

If I run some color processing function, like:

Blend[RGBColor /@ {"#DC4E00", "#000000", "#822250", "#FCC11B"}]

I get back a RGBColor object:

RGBColor[0.5901960784313726, 0.29901960784313725, ...

I get back a RGBColor object:

RGBColor[0.5901960784313726, 0.29901960784313725, ...

- asked by d8uv (8 votes), answered by d8uv (9 votes)

—————————-

[ReplaceAll behavior change from 10.2 to 10.3] http://mathematica.stackexchange.com/questions/104354/replaceall-behavior-change-from-10-2-to-10-3

Executing:

replace[res_] := res /. {a_Integer, b_Integer} :> (a + b);

l1 = <|"respID" -> {1,2} , "key2" -> <|"key2" -> {2, 1}|>|>;

l2 = {"respID" -> {1,2} , "key2" -> ...

l1 = <|"respID" -> {1,2} , "key2" -> <|"key2" -> {2, 1}|>|>;

l2 = {"respID" -> {1,2} , "key2" -> ...

- asked by Murta (7 votes)

Here is a start. I'm looking for a nice way to draw it.

Polygon @ {{0, 0}, {-1, 0},

Sqrt[2] {Cos[#], Sin[#]} &[Pi - (ArcCot[1])]},

Polygon @ {{0, ...

- asked by mathe (22 votes), answered by Bob Hanlon (16 votes)

—————————-

[Mathematica 10.0.x freezes in Initializing kernels] http://mathematica.stackexchange.com/questions/92931/mathematica-10-0-x-freezes-in-initializing-kernels

Bug caused by paclet update and fixed by paclet update.

I updated to Windows 10 and have been running Mathematica fine on it for over a month. For some reason, it has just stopped working. I don't ...

- asked by mitcheljh (67 votes), answered by ilian (84 votes)

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

[How to find and show a point value on the line?] http://mathematica.stackexchange.com/questions/104384/how-to-find-and-show-a-point-value-on-the-line

Manipulate[

Module[{eqns, f},

eqns = {y'[x] ==

aa3*y[x]^3 + aa2*y[x]^2 + aa1*y[x] + aa0[t] + bb[t]/y[x],

y[0] == 15};

f = NDSolve[eqns, y, {x, 0, 1}][[1, 1, -1]];

Plot[f[x], {x, 0, ...

Module[{eqns, f},

eqns = {y'[x] ==

aa3*y[x]^3 + aa2*y[x]^2 + aa1*y[x] + aa0[t] + bb[t]/y[x],

y[0] == 15};

f = NDSolve[eqns, y, {x, 0, 1}][[1, 1, -1]];

Plot[f[x], {x, 0, ...

- asked by user37037 (1 vote)

—————————-

[Is it possible for librarylink function to be Listable like that in Compile?] http://mathematica.stackexchange.com/questions/104382/is-it-possible-for-librarylink-function-to-be-listable-like-that-in-compile

We know in Compile, there is an Option RuntimeAttributes ; Listable which can let the compiled function easily explore the power of thread parallelization.

So is it possible for a librarylink ...

- asked by matheorem (2 votes)

—————————-

[How could get all escape characters in Mathematica?] http://mathematica.stackexchange.com/questions/104299/how-could-get-all-escape-characters-in-mathematica

I am evaluating expression by using KernelLink.

But the kernel will be suspended endless when meets a invalid escape character. a\abc, \[badEscape] for example.

So I have to filter all the invalid ...

- asked by Michael (3 votes)

[Why is SatisfiabilityCount faster than SatisfiableQ?] http://mathematica.stackexchange.com/questions/103726/why-is-satisfiabilitycount-faster-than-satisfiableq

Consider the following (large) Boolean expression, which arose in a SAT problem. (The expression is not satisfiable.)

On my system (Mathematica ...

- asked by David Zhang (13 votes), answered by Adam Strzebonski (16 votes)

—————————-

[ReplaceAll with Associations instead of Rules] http://mathematica.stackexchange.com/questions/103497/replaceall-with-associations-instead-of-rules

I have just noticed that

In other words, the association seems to behave as a rule. I didn't see any example or reference to this behavior in the ...

- asked by Gustavo Delfino (13 votes), answered by Edmund (4 votes)

—————————-

[Is it possible to Parallelize Select?] http://mathematica.stackexchange.com/questions/103548/is-it-possible-to-parallelize-select

Given a large list of elements, is it possible to improve Select by parallelizing?

An example: from a 10,000,000-element list of integers between 1 and 10, select all primes

rl = RandomInteger[10, ...

- asked by jjstankowicz (11 votes), answered by bbgodfrey (15 votes)

—————————-

[how to enforce a symmetric solution with fem?] http://mathematica.stackexchange.com/questions/103606/how-to-enforce-a-symmetric-solution-with-fem

I'm solving the laplace equation in a domain with holes, and I need to compute the integral of the gradient on the boundary of these holes.

For that I define a mesh and solve the laplace equation ...

- asked by tsuresuregusa (10 votes), answered by user21 (5 votes)

—————————-

[Best way to emulate MATLAB's bsxfun using Map and similar functions] http://mathematica.stackexchange.com/questions/103527/best-way-to-emulate-matlabs-bsxfun-using-map-and-similar-functions

Given a matrix, we want to subtract the mean of each column, from all entries in that column. So given this matrix:

(mat = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) // MatrixForm

the mean ...

- asked by Nasser (10 votes), answered by Mike Honeychurch (11 votes)

—————————-

[Order of evaluation - does Mathematica evaluate variables before or after substitution?] http://mathematica.stackexchange.com/questions/103800/order-of-evaluation-does-mathematica-evaluate-variables-before-or-after-substi

Let's say I write

Does Mathematica internally evaluate y before or after substituting it into z? I.e., does Mathematica internally evaluate this as

- asked by tparker (9 votes), answered by Alexei Boulbitch (12 votes)

—————————-

[How to ”inform” successive ContourPlot calculations?] http://mathematica.stackexchange.com/questions/103673/how-to-inform-successive-contourplot-calculations

I need to draw some contour plots of very non-linear functions. As a simple example, take a Mandelbrot Set divergence contour near . (Just to be clear, I'm not trying to write a ...

- asked by Jerry Guern (9 votes), answered by bbgodfrey (10 votes)

[How to calculate contour integrals with Mathematica?] http://mathematica.stackexchange.com/questions/34073/how-to-calculate-contour-integrals-with-mathematica

How to calculate the integral of over the unit circle counterclockwise for each branch of the integrand?

- asked by user64494 (20 votes), answered by Artes (39 votes)

—————————-

[How do I remove grid from this photo?] http://mathematica.stackexchange.com/questions/88494/how-do-i-remove-grid-from-this-photo

I found this cat a month ago, and I'm not his owners' friend so the mosquito grid was the inevitable problem. I would like to post-process this photo to get rid of it, but I don't know exactly how ...

- asked by Nakilon (30 votes), answered by nikie (49 votes)

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

[Fitting data with unique variable per measurement] http://mathematica.stackexchange.com/questions/103770/fitting-data-with-unique-variable-per-measurement

Imagine we are in the following situation, we have a nonlinear system of functions with coordinates , and unknown parameters 's and . Let this system be defined as,

...

- asked by user19218 (3 votes)

—————————-

[‘ParallelTable‘ pending the MathKernel after execution] http://mathematica.stackexchange.com/questions/103611/paralleltable-pending-the-mathkernel-after-execution

I have done a ParallelTable computation in script mode. After execution, the output is fine and I've got all the data I needed. but the kernel seems pending, usually it should exit after they finished ...

- asked by buzhidao (2 votes)

—————————-

[Call Magma in Mathematica] http://mathematica.stackexchange.com/questions/103602/call-magma-in-mathematica

I've written some code in Mathematica, related to some group theory questions I have. Subsequently, I found that part of the code could be significantly sped up if I could just call a routine in ...

- asked by Pace Nielsen (4 votes)

[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):

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

- 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", ...

... 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)

[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,

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[[#]]} &@

...

Matrix = {{0.05, (a*k)^2}, {(a*k)^2, -0.05}};

{eps, psi} = Eigensystem[Matrix];

{eps,psi} = {eps[[#]], psi[[#]]} &@

...

- asked by Xiao (2 votes)

[ giving wrong answer?] http://mathematica.stackexchange.com/questions/102722/sum-k-1-infty-left-lfloor-frac55k-right-rfloor-giving-wrong-ans

When I try to evaluate the following:

using

Mathematica provides an answer of when it ...

- asked by 1110101001 (14 votes), answered by ttetrafon (-4 votes)

—————————-

[How do I insert a calculated value into a text cell?] http://mathematica.stackexchange.com/questions/102849/how-do-i-insert-a-calculated-value-into-a-text-cell

Suppose in a notebook I've calculated the value of some expression and assigned it to a variable. How do I insert the value of that variable in a text cell without just typing in the value? That is, I ...

- asked by Robert B (10 votes), answered by eldo (3 votes)

—————————-

[Prevent Plus from threading] http://mathematica.stackexchange.com/questions/102721/prevent-plus-from-threading

This is probably a very simple question, but I couldn't find a duplicate.

As everybody knows, x, y + v gives x + v, y + v. But if I intend v to represent a vector, for example if I am going to ...

- asked by Rahul (10 votes), answered by JHM (5 votes)

—————————-

[What kind of patterns in a list of rules would benefit from being Dispatched?] http://mathematica.stackexchange.com/questions/102873/what-kind-of-patterns-in-a-list-of-rules-would-benefit-from-being-dispatched

I have a long list of rules for manipulating expressions. They are of the form:

- asked by QuantumDot (9 votes), answered by Schopenhauer (7 votes)

—————————-

[Revolution of Koch Snowflake] http://mathematica.stackexchange.com/questions/102697/revolution-of-koch-snowflake

How to plot shape which made from revolution of the Koch Snowflake?

I try to use , but I think there is no for Koch Snowflake.

Sorry for my ...

- asked by vito (9 votes), answered by ubpdqn (11 votes)

—————————-

[Reverse Polish Notation] http://mathematica.stackexchange.com/questions/102976/reverse-polish-notation

Is there a way to evaluate a string containing RPN in Mathematica?

SE thinks this question is too short, so let me expand on it. Do you know of any function, that provides the following ...

- asked by murphy (8 votes), answered by Mark Adler (4 votes)

—————————-

[Bug? Completely wrong results from NSolve] http://mathematica.stackexchange.com/questions/102724/bug-completely-wrong-results-from-nsolve

The following code creates two polynomials and in variables and , then uses NSolve to find roots. But the polynomials don't evaluate to zero at those roots.

- asked by Jerry Guern (8 votes), answered by Rom38 (6 votes)

[Advice for Mathematica as Mathematician's Aid] http://mathematica.stackexchange.com/questions/92686/advice-for-mathematica-as-mathematicians-aid

I use Mathematica mainly as an aid in symbolic attacks on problems, usually intermediate or harder and often number theoretic. While Reduce, Simplify, et al. are remarkably powerful, they of course ...

- asked by CarlEdman (55 votes), answered by MarcoB (39 votes)

—————————-

- asked by J. M. (386 votes), answered by faysou (354 votes)

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

[CDF Enterprise : Protection and licensing] http://mathematica.stackexchange.com/questions/102650/cdf-enterprise-protection-and-licensing

I am new to Mathematica but on top of that I am asked to create a CDF file that is IP protected (encrypted) and also licensed.

In this video they are giving the way to protect the code. At the end ...

- asked by Erdem (3 votes)

—————————-

[Speedup ListCorrelation when using generalized correlation function] http://mathematica.stackexchange.com/questions/102708/speedup-listcorrelation-when-using-generalized-correlation-function

ImageCorrelation provides several general function that can be used to replace the default Dot function. For example, in the documentation of ImageCorrelation, there is an example using CosineDistance ...

- asked by xslittlegrass (1 vote)

—————————-

[How can I define geographic regions and new entities?] http://mathematica.stackexchange.com/questions/102948/how-can-i-define-geographic-regions-and-new-entities

There are three functions (GeoListPlot, GeoGraphics and Entity) related to working with geographic regions but it is not clear from the documentation how to create new Entities or custom geographic ...

- asked by Tyler Durden (4 votes)

[How to organically build up nested associations?] http://mathematica.stackexchange.com/questions/102466/how-to-organically-build-up-nested-associations

Suppose I want to construct an association of associations, such as a list of people with attributes:

- asked by Jess Riedel (17 votes), answered by Kuba (14 votes)

—————————-

[How to restart computation when kernels die?] http://mathematica.stackexchange.com/questions/102268/how-to-restart-computation-when-kernels-die

When an important process needs to be kept alive, there are monitoring tools to restart them if they die (e.g. god tasks in ruby), in my case I have an overnight scraping task that I need to have done ...

- asked by M.R. (15 votes), answered by Szabolcs (11 votes)

—————————-

[If I have a very large Popup Menu list how can I make that searchable?] http://mathematica.stackexchange.com/questions/102470/if-i-have-a-very-large-popup-menu-list-how-can-i-make-that-searchable

Imagine that you have a PopupMenu's list that requires a lot of scrolling through the selections. Is there a way to create a control that will only display a subsection of the complete list?

- asked by Mike Honeychurch (14 votes), answered by Mike Honeychurch (14 votes)

—————————-

[Bug in RegionMember?] http://mathematica.stackexchange.com/questions/102439/bug-in-regionmember

RegionMember (new in V10) appears to have a bug. For some polygons it finds points that are clearly outside to be ”members” of the region. This depends on the shape of the polygon in a way that is ...

- asked by kukako-muka (14 votes)

—————————-

[Which elements of a large array are part of a set?] http://mathematica.stackexchange.com/questions/102212/which-elements-of-a-large-array-are-part-of-a-set

I have a large integer packed array arr. My array is multidimensional, but for simplicity let's consider 1D arrays for now. ArrayReshape takes care of the rest.

I also have a set of integers (a ...

- asked by Szabolcs (14 votes), answered by Leonid Shifrin (11 votes)

—————————-

[more numerically accurate inverse matrix] http://mathematica.stackexchange.com/questions/102261/more-numerically-accurate-inverse-matrix

I encountered the following matrix

mat = {{2,

2.161209223472559` + 1.682941969615793` I}, {2.161209223472559` -

1.682941969615793` I, 2}}

and Inverse[mat] will give

{{-0.57092 - ...

2.161209223472559` + 1.682941969615793` I}, {2.161209223472559` -

1.682941969615793` I, 2}}

and Inverse[mat] will give

{{-0.57092 - ...

- asked by matheorem (12 votes), answered by Karsten 7. (11 votes)

—————————-

[Stress calculations using finite elements] http://mathematica.stackexchange.com/questions/102522/stress-calculations-using-finite-elements

A standard engineering problem is to calculate stresses in a structure due to applied forces. With the inclusion of the finite element method in version 10 this question attempts to investigate how ...

- asked by Hugh (11 votes), answered by user21 (2 votes)

[Upgrade to Windows 10] http://mathematica.stackexchange.com/questions/89407/upgrade-to-windows-10

Can users of Mathematica on Windows 7 or Windows 8/8.1 upgrade their computers to Windows 10 – a process that began today? Does Mathematica work? Are all the settings, licenses, access to files and ...

- asked by Lubos Motl (38 votes), answered by RunnyKine (32 votes)

—————————-

[How can I improve Mathematica's resolution on a macbook retina display?] http://mathematica.stackexchange.com/questions/18419/how-can-i-improve-mathematicas-resolution-on-a-macbook-retina-display

Mathematica 9.0 looks a bit fuzzy on the retina screen, how can I increase the resolution?

Here another screenshot showing a direct comparison between the browser and Mathematica

- asked by Tom Wellington (39 votes), answered by programming_historian (20 votes)

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

[How to avoid crashing with ConformImages?] http://mathematica.stackexchange.com/questions/102578/how-to-avoid-crashing-with-conformimages

ConformImages[] is causing a kernel crash when applied to a list of 5k images. Is there any way to apply ConformImages on the list in batches or asynchronously to conserve memory?

Here's the ...

- asked by M.R. (2 votes)

—————————-

[Fitting real and imaginary parts of a function] http://mathematica.stackexchange.com/questions/102233/fitting-real-and-imaginary-parts-of-a-function

I have an analytic form of a function

I know this function can be obtained (up to some overall normalization) from solving a differential equation numerically for ...

- asked by Physics Moron (3 votes)

—————————-

[Reconstruct a ‘Graph‘ from a picture] http://mathematica.stackexchange.com/questions/102362/reconstruct-a-graph-from-a-picture

Actually,I post a very similar question before this.How to generate a Graph from a picture of a graph

The Dr. belisarius's answer have accomplished it.But I find a limitation in that method:If the ...

- asked by yode (6 votes)

[How can I use Kenneth Moreland's ”Diverging Color Maps for Scientific Visualization” in plots?] http://mathematica.stackexchange.com/questions/101625/how-can-i-use-kenneth-morelands-diverging-color-maps-for-scientific-visualizat

I often want to plot two dimensional data that is centered around zero (for me, this is usually a 2D optical spectroscopy signal, but there are other cases), and the MATLAB ”Jet” color scheme is ...

- asked by Jason B (21 votes), answered by Jason B (25 votes)

—————————-

[Named patterns in Except] http://mathematica.stackexchange.com/questions/101903/named-patterns-in-except

Bug introduced in 8 or earlier and persisting through 10.3 or later

Bug isn't present in version 5.2

I don't think I quite understand how Except works.

I want to define , ...

- asked by QuantumDot (12 votes), answered by Kuba (11 votes)

—————————-

[What is the difference between Inherited and (Inherited + 0)] http://mathematica.stackexchange.com/questions/101715/what-is-the-difference-between-inherited-and-inherited-0

Let's create a stylesheet:

NotebookPut@

Notebook[{

Cell[StyleData[StyleDefinitions -> "Default.nb"]],

Cell[StyleData["myStyle"]],

Cell[StyleData["myStyle2", StyleDefinitions -> ...

Notebook[{

Cell[StyleData[StyleDefinitions -> "Default.nb"]],

Cell[StyleData["myStyle"]],

Cell[StyleData["myStyle2", StyleDefinitions -> ...

- asked by Kuba (12 votes), answered by Kuba (5 votes)

—————————-

[Why is DiscretizeGraphics missing points on my curve?] http://mathematica.stackexchange.com/questions/101594/why-is-discretizegraphics-missing-points-on-my-curve

I have a graphics expression which renders nicely as a closed curve when put in Graphics, I don't understand why I can't get the lines from DiscretizeGraphics or BoundaryDiscretizeGraphics:

p = ...

- asked by M.R. (12 votes), answered by Jason B (7 votes)

—————————-

[What's going on here? Some kind of rationalization ”under the covers”?] http://mathematica.stackexchange.com/questions/102050/whats-going-on-here-some-kind-of-rationalization-under-the-covers

Observe:

eq = (.25 a + .5 b + .25 c);

CoefficientRules[eq^2]

CoefficientRules[eq^2 // Expand]

results in

{{2, 0, 0} -> 1/16, {1, 1, 0} -> 1/4, {1, 0, 1} -> 1/8, {0, 2, 0} ->

1/4, ...

CoefficientRules[eq^2]

CoefficientRules[eq^2 // Expand]

results in

{{2, 0, 0} -> 1/16, {1, 1, 0} -> 1/4, {1, 0, 1} -> 1/8, {0, 2, 0} ->

1/4, ...

- asked by ciao (11 votes)

—————————-

[Integration of incomplete rings (ellipses) pattern] http://mathematica.stackexchange.com/questions/102069/integration-of-incomplete-rings-ellipses-pattern

I am facing a problem in trying to do a series of averages in incomplete images. I have a series of X-ray data images, like this one:

As you can see my image is a series of partial rings/ellipses ...

- asked by Matteo S (10 votes), answered by nikie (16 votes)

—————————-

[Is mathematica's right click menu customizable to add Simplify tools?] http://mathematica.stackexchange.com/questions/101684/is-mathematicas-right-click-menu-customizable-to-add-simplify-tools

Mathematica provide Algebraic Manipulate palette for simplifying expression. But the palette window will always stay on top, which is quite annoying.

Is is possible to customize mathematica's right ...

- asked by matheorem (10 votes), answered by Karsten 7. (7 votes)

- asked by J. M. (382 votes), answered by faysou (348 votes)

—————————-

[How to make Jacobian automatically in Mathematica] http://mathematica.stackexchange.com/questions/5790/how-to-make-jacobian-automatically-in-mathematica

If we have two vectors, and , how can I make Jacobian matrix automatically in Mathematica?

- asked by George Mills (20 votes), answered by Jens (27 votes)

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

[Coppersmith's algorithm like Pari's zncoppersmith?] http://mathematica.stackexchange.com/questions/101978/coppersmiths-algorithm-like-paris-zncoppersmith

Is there some Mathematica package (or built-in that I missed) available, more or less equivalent to Pari's zncoppersmith function?

Paraphrasing that source: given a polynomial with integer ...

- asked by fgrieu (1 vote)

—————————-

[How do I calculate this integral along a complex line (not a contour) in mathematica?] http://mathematica.stackexchange.com/questions/102088/how-do-i-calculate-this-integral-along-a-complex-line-not-a-contour-in-mathema

Given the function:

Where a is a positive constant and:

Where b is also a ...

- asked by T. Welsh (1 vote)

—————————-

[How to add symbols to autocompletion list] http://mathematica.stackexchange.com/questions/101871/how-to-add-symbols-to-autocompletion-list

There are some built-in Mathematica symbols that I use quite frequently but are not included in the autocompletion list in the front end. Examples are Analytic and PolynomialForm. (As @march points ...

- asked by QuantumDot (4 votes)

[Can I emulate Wolfram's automatic package updating in my own packages?] http://mathematica.stackexchange.com/questions/101035/can-i-emulate-wolframs-automatic-package-updating-in-my-own-packages

It seems that some Wolfram-provided packages are smart enough to automatically check with the Wolfram servers, notice when a newer version is available, and download it, so that the user always has ...

- asked by ibeatty (12 votes), answered by ZachB (3 votes)

—————————-

[Zooming using GeoGraphics] http://mathematica.stackexchange.com/questions/100920/zooming-using-geographics

Suppose I do:

GeoGraphics[Entity[”City”, ”Eureka”, ”California”, ”UnitedStates”]]

What do folks do at this point to zoom in to various parts of the image?

- asked by David (12 votes), answered by Peter Roberge (12 votes)

—————————-

[Shortest tour with vertex priority] http://mathematica.stackexchange.com/questions/101175/shortest-tour-with-vertex-priority

I changed the title of my question and tried to simplify formulation of the problem.

I solve a very big vehicle routing problem. I divided this one big problem on many small sub-problems. Each small ...

- asked by Alexey Golyshev (10 votes), answered by Alexey Golyshev (4 votes)

—————————-

[Backquote in string template?] http://mathematica.stackexchange.com/questions/101342/backquote-in-string-template

I need to have backquotes in a StringTemplate.

For example

StringTemplate["``1``"][2]

Returns "21" instead of "`2`".

How can I get the correct result ?

Of course a solution would be to use ...

For example

StringTemplate["``1``"][2]

Returns "21" instead of "`2`".

How can I get the correct result ?

Of course a solution would be to use ...

- asked by faysou (8 votes), answered by Kuba (5 votes)

—————————-

[create an (almost) hexagonal mesh on an ellipsoid] http://mathematica.stackexchange.com/questions/101183/create-an-almost-hexagonal-mesh-on-an-ellipsoid

EDIT I edited the question in order to take into @Kuba's comment.

I want to create this figure with Mathematica (in particular an almost hexagonal mesh on an ellipsoid; thanks to @Kuba I know this ...

- asked by dimitris (8 votes), answered by Kuba (10 votes)

—————————-

[How to count number of small dots in a picture] http://mathematica.stackexchange.com/questions/100957/how-to-count-number-of-small-dots-in-a-picture

I have this picture of small particles in a polymer film. I want to count how many particles in the figure, so that I can have a rough estimation of the particle density. But the image quality is ...

- asked by MYG (8 votes), answered by Graumagier (4 votes)

—————————-

[Why some GeoProjections show just half of Chukotka region (Russian map)] http://mathematica.stackexchange.com/questions/101334/why-some-geoprojections-show-just-half-of-chukotka-region-russian-map

I've moved to V.10.3 as suggested and proceed with Russian map (the aim is to geoplot regional distributions of some values). Notice most eastern Russian region - Chukotka. Chukotka, unlike other ...

- asked by garej (7 votes), answered by Peter Roberge (1 vote)

[How can I improve Mathematica's resolution on a macbook retina display?] http://mathematica.stackexchange.com/questions/18419/how-can-i-improve-mathematicas-resolution-on-a-macbook-retina-display

Mathematica 9.0 looks a bit fuzzy on the retina screen, how can I increase the resolution?

Here another screenshot showing a direct comparison between the browser and Mathematica

- asked by Tom Wellington (38 votes), answered by programming_historian (20 votes)

—————————-

[How do I draw a pair of buttocks?] http://mathematica.stackexchange.com/questions/66538/how-do-i-draw-a-pair-of-buttocks

I'm trying to develop a function which 3D plot would have a buttocks like shape.

Several days of searching the web and a dozen my of own attempts to solve the issue have brought nothing but two ...

- asked by Simpleton Jack (236 votes), answered by mikuszefski (360 votes)

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

[Using Mathematica with touchscreens] http://mathematica.stackexchange.com/questions/101089/using-mathematica-with-touchscreens

I really like using my Windows 10 touchscreen to move around in websites, documents, etc. It doesn't work in Mathematica. Can that be fixed by changing a global notebook setting, or is it something ...

- asked by George Wolfe (4 votes)

—————————-

[Theorem Proving]http://mathematica.stackexchange.com/questions/101201/theorem-proving

It's a hard for me to write english so I'll try to go straight to my problem. There is abstract predicate f, that takes two parameters. There are also two other predicates b and u:

- asked by rattrapper (5 votes)

—————————-

[Initializing FinancialData indices .... never finishes] http://mathematica.stackexchange.com/questions/101339/initializing-financialdata-indices-never-finishes

Retrieving data using FinancialData became more unreliable in the last couple of months, but simply retrying was enough to finally get the data. Now it seems to be nearly completely broken in ...

- asked by Karsten 7. (3 votes)

[Wiggly and imprecise animated gif output] http://mathematica.stackexchange.com/questions/100628/wiggly-and-imprecise-animated-gif-output

Trying to make animated gif of zooming into famous Ford circles. With the code

visibleQ[lh_, hr_, c_, k_] := Which[

lh >= 1/(2 k), If[2 c k^2 <= 1 && lh^2 < c (1 - c k^2), True, ...

- asked by (12 votes), answered by Michael E2 (7 votes)

lh >= 1/(2 k), If[2 c k^2 <= 1 && lh^2 < c (1 - c k^2), True, ...

- asked by (12 votes), answered by Michael E2 (7 votes)

—————————-

[What is the difference between Dynamic[x] and Dynamic[ h[x] ] for DynamicModule variables?] http://mathematica.stackexchange.com/questions/100828/what-is-the-difference-between-dynamicx-and-dynamic-hx-for-dynamicmodule

Why plain Dynamic[x] is less sensitive and less likely to automatically be updated than e.g. Dynamic[x]?

The issue was raised here couple of times but I don't remember any general answer, just work ...

- asked by Kuba (11 votes)

—————————-

[Pick elements from list ”separately”] http://mathematica.stackexchange.com/questions/100696/pick-elements-from-list-separately

I have the following list I want to pick elements from:

mylist = 1, 5, 7, 3, 4, 7, 2, 9, 9, 1, 10, 12, 2, 64, 34, 64

I have another list with 0's and 1's which is my selector:

selector = 1, 1, ...

- asked by holistic (11 votes), answered by eldo (11 votes)

—————————-

[A quicker than outer] http://mathematica.stackexchange.com/questions/100551/a-quicker-than-outer

I need to get a matrix , where form a partition of an interval, is a given function. I use

- asked by Dmitri (11 votes), answered by Szabolcs (14 votes)

—————————-

[Converting a list of rules to a list of lists] http://mathematica.stackexchange.com/questions/100700/converting-a-list-of-rules-to-a-list-of-lists

What are some easy ways to convert the list of Rules

{"Joe" -> 94, "Jane" -> 85, "Bob" -> 82, "Bill" -> 83,

"Michelle" -> 98}

into a list of lists:

...

"Michelle" -> 98}

into a list of lists:

...

- asked by David (9 votes), answered by eldo (14 votes)

—————————-

[Magnifying Glass on a Plot] http://mathematica.stackexchange.com/questions/100691/magnifying-glass-on-a-plot

Although there is a trick in TEX magnifying glass but I want to know is there any function to magnifying glass on a plot with Mathematica?

For example for a function as Sin[x] and at x=Pi/6

Below, ...

- asked by Ackaran (9 votes), answered by Karsten 7. (13 votes)

—————————-

[How to extract a region shape from an 2 colour image?] http://mathematica.stackexchange.com/questions/100578/how-to-extract-a-region-shape-from-an-2-colour-image

I'll start by saying that I don't know anything about image processing. I have an image and I need to extract its outermost shape for use in a WordCloud. The image only has two colours and the ...

- asked by Edmund (9 votes), answered by nikie (4 votes)

[How to express trigonometric equation in terms of of given trigonometric function?] http://mathematica.stackexchange.com/questions/434/how-to-express-trigonometric-equation-in-terms-of-of-given-trigonometric-functio

How can I express a trigonometric equation / identity in terms of a given trigonometric function?

using following trigonometric identities

- asked by Prashant Bhate (24 votes), answered by Simon (28 votes)

—————————-

[How to find all the local minima/maxima in a range] http://mathematica.stackexchange.com/questions/5575/how-to-find-all-the-local-minima-maxima-in-a-range

I want to find :

From those points I can interpolate and combine functions upper and lower boundary. What I am really interested in, is the ...

- asked by Margus (52 votes), answered by Daniel Lichtblau (56 votes)

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

[Solving this system of nonlinear equations] http://mathematica.stackexchange.com/questions/100466/solving-this-system-of-nonlinear-equations

Edit Interestingly, I realized solving my problem with equations appeared to be more efficient than using mathematical results on the solutions to reduce the problem to equations (the ...

- asked by anderstood (2 votes)

—————————-

[Share variables among notebooks with different Kernels] http://mathematica.stackexchange.com/questions/100760/share-variables-among-notebooks-with-different-kernels

So I have a server running in another notebook with a secondary kernel. I run my main notebook and launch the server notebook, but I have configured the variables in my main one, and can't find a way ...

- asked by jaimehrubiks (2 votes)

—————————-

[Planning flights for a special route] http://mathematica.stackexchange.com/questions/100768/planning-flights-for-a-special-route

I want to plan a world trip with Mathematica. So I already have the dataset with all the cities I want to visit and the tour (with the command FindShortestTour). So now I want to know how to come from ...

- asked by Kristina (3 votes)

[Is Mathematica worth it for me?] http://mathematica.stackexchange.com/questions/100072/is-mathematica-worth-it-for-me

I'm 13 years old and in 7th grade. I'm currently in Algebra 1, and I have fallen in love with both math and programming.

When I came upon Mathematica, it was awesome. My two favorite things fused ...

- asked by TreFox (50 votes), answered by Pillsy (33 votes)

—————————-

[GroupBy twice gives different results] http://mathematica.stackexchange.com/questions/100139/groupby-twice-gives-different-results

update: confirmed as a bug related to 'N' when using GroupBy or GatherBy. It is a bug at least since version 7

It took me quite a lot of time to finally trace down to this strange output. I really ...

- asked by matheorem (25 votes), answered by Patrick Stevens (15 votes)

—————————-

[How to make a blob in 3D?] http://mathematica.stackexchange.com/questions/99754/how-to-make-a-blob-in-3d

I am trying to make a blob like the one shown below, but in 3D so I can rotate it. I'm trying to use ParametricPlot3D or SphericalPlot3D. I can make a sphere easily. But my knowledge of how to modify ...

- asked by Michael McCain (20 votes), answered by Eric Towers (12 votes)

—————————-

[Coordinate system transformation problem (about Euler angle)] http://mathematica.stackexchange.com/questions/100054/coordinate-system-transformation-problem-about-euler-angle

This question comes from the work that constructing the general cylinder by the NURBS. I have implemented the point-set that in the plane, now I want to implement the ...

- asked by Shutao TANG (14 votes), answered by J. M. (9 votes)

—————————-

[List of symbols marked [[EXPERIMENTAL]] in the documentation] http://mathematica.stackexchange.com/questions/100058/list-of-symbols-marked-experimental-in-the-documentation

Some of the built-in Wolfram Language symbols are marked as [[EXPERIMENTAL]] in the documentation. For example

[Echo]

How can I get a list of all the symbols marked as [[EXPERIMENTAL]]?

(This ...

- asked by Karsten 7. (14 votes), answered by Karsten 7. (20 votes)

—————————-

[Random letters: What is the chance, that true words are coming?] http://mathematica.stackexchange.com/questions/99800/random-letters-what-is-the-chance-that-true-words-are-coming

Suppose, that we are just typing random letters with our keyboards(we use space bar too). We don't make difference between big and small letters. If we work for a long time, how much from the words ...

- asked by Arquis (13 votes), answered by belisarius has settled (18 votes)

—————————-

[How to take and evaluate a specific part of a list without evaluating the rest?] http://mathematica.stackexchange.com/questions/100217/how-to-take-and-evaluate-a-specific-part-of-a-list-without-evaluating-the-rest

I have a large list, for example,

lis = {x + y, x y, Sin[x] y + Exp[y], x^2 y}

and its elements depend on variables x and y. Later I assign numerical values to x and y

x = {1, 2, 3, 4, 5}

y = {3, ...

lis = {x + y, x y, Sin[x] y + Exp[y], x^2 y}

and its elements depend on variables x and y. Later I assign numerical values to x and y

x = {1, 2, 3, 4, 5}

y = {3, ...

- asked by renphysics (9 votes), answered by Chris Degnen (9 votes)

[How to use Mathematica functions in Python programs?] http://mathematica.stackexchange.com/questions/4643/how-to-use-mathematica-functions-in-python-programs

I'd like to know how can I call Mathematica functions from Python.

I appreciate a example, for example, using the Mathematica function Prime.

I had search about MathLink but how to use it in Python ...

- asked by GarouDan (35 votes), answered by GarouDan (14 votes)

—————————-

[Mathematica sporadically crashes on open] http://mathematica.stackexchange.com/questions/32232/mathematica-sporadically-crashes-on-open

Sometimes, when I open Mathematica, while the opening splash screen still says ”Initializing Kernel Connections”, Windows will tell me that ”Wolfram Mathematica 9 has stopped working”. This will ...

- asked by William Kunkel (9 votes), answered by Bingo (5 votes)

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

[Can't get Mathematica to Import PDF files with diacritics on the file name] http://mathematica.stackexchange.com/questions/99980/cant-get-mathematica-to-import-pdf-files-with-diacritics-on-the-file-name

Tested with versions 9.0.0, 10.0.2 and 10.3.0, all under OS X 10.10.5.

The drag-and-drop front-end functionality also results in $Failed.

Surprisingly, Importing, JPEGs, TXTs, and XLSX work just ...

The drag-and-drop front-end functionality also results in $Failed.

Surprisingly, Importing, JPEGs, TXTs, and XLSX work just ...

- asked by Aisamu (4 votes)

—————————-

[Where can I find documentation on use of special characters in templates?] http://mathematica.stackexchange.com/questions/100023/where-can-i-find-documentation-on-use-of-special-characters-in-templates

I am new to Templates. I have seen the usage

"\!\(\*StyleBox ...)"

as here: disabling templates What does the string "!(*" accomplish and

can I find some documentation of this notation?

"\!\(\*StyleBox ...)"

as here: disabling templates What does the string "!(*" accomplish and

can I find some documentation of this notation?

- asked by John McGee (1 vote)

—————————-

[Exponential Matrix Diffentiation] http://mathematica.stackexchange.com/questions/100214/exponential-matrix-diffentiation

I have been struggling with the following question while solving an optimization problem in . Basically, I have

- asked by Guilherme Thompson (1 vote)

[Terrifying performance decrease for contour/density plots in v10.1 -¿ 10.3] http://mathematica.stackexchange.com/questions/99255/terrifying-performance-decrease-for-contour-density-plots-in-v10-1-10-3

I setup for download a test dataset at http://www.inrim.it/~magni/cm.dat.gz (a set of 64800 triplets x,y,z).

The behavior can be reproduced with the following code:

link = ...

- asked by alessandro (24 votes), answered by Jason B (13 votes)

—————————-

[Cyclic Take function?] http://mathematica.stackexchange.com/questions/99188/cyclic-take-function

Is there some direct and simple ”cyclic Take”, sometimes also known as ”overtake” in Mathematica. That is, if the take specification runs out of elements, it just cycles back to the beginning (as many ...

- asked by murray (21 votes), answered by kglr (22 votes)

—————————-

[Speeding up generation of block diagonal matrix] http://mathematica.stackexchange.com/questions/99467/speeding-up-generation-of-block-diagonal-matrix

I'm struggling with the following problem. I have square matrices (full, filled with real machine precision numbers, thus are packed, all different) of size . I wolud like to place them on a ...

- asked by mmal (16 votes), answered by ybeltukov (14 votes)

—————————-

[Integrate returns imaginary answer for smooth, real function] http://mathematica.stackexchange.com/questions/99395/integrate-returns-imaginary-answer-for-smooth-real-function

Bug introduced in 7 or earlier and persisting through 10.3

I'm trying to evaluate the integral:

with ...

- asked by Kevin Driscoll (15 votes)

—————————-

[Detecting an ellipse in a glaucoma photo] http://mathematica.stackexchange.com/questions/99578/detecting-an-ellipse-in-a-glaucoma-photo

For glaucoma diagnosis it is common to determine a ”cup to disk ratio” which compares the diameter of the optic disk (VDD) and optic cup (VCD). The optical disk is visible as a circular red feature ...

- asked by indra ginanjar A.T (14 votes), answered by belisarius has settled (17 votes)

—————————-

[How to implement the general array broadcasting method from NumPy?] http://mathematica.stackexchange.com/questions/99171/how-to-implement-the-general-array-broadcasting-method-from-numpy

A friend of mine introduced array broadcasting in the Python NumPy package which is very convenient (and also highly efficient).

The idea is perfectly shown in this picture:

Basically, the method ...

- asked by matheorem (14 votes), answered by Pillsy (15 votes)

—————————-

[Derivative of a pure function with SlotSequence] http://mathematica.stackexchange.com/questions/99439/derivative-of-a-pure-function-with-slotsequence

I can live with this but I can't figure out why the following is 0:

Derivative[1][f[##] &][x]

0

From documentation for Derivative:

[...] Whenever Derivative[n][f] is generated, the WL ...

- asked by Kuba (14 votes), answered by Michael E2 (13 votes)

[Even Fibonacci numbers] http://mathematica.stackexchange.com/questions/37266/even-fibonacci-numbers

Today, I found the Euler Project. Problem #2 is

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, ...

- asked by Shutao TANG (26 votes), answered by rcollyer (34 votes)

—————————-

[How can I plot the direction field for a differential equation?] http://mathematica.stackexchange.com/questions/8841/how-can-i-plot-the-direction-field-for-a-differential-equation

I'd like to plot the graph of the direction field for a differential equation, to get a feel for it. I'm a novice, right now, when it comes to plotting in Mathematica, so I'm hoping that someone can ...

- asked by Matt Groff (16 votes), answered by Peter Breitfeld (13 votes)

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

[Odd Coloring with GeoRegionValuePlot] http://mathematica.stackexchange.com/questions/99478/odd-coloring-with-georegionvalueplot

When I'm plotting data with GeoRegionValuePlot, I'm getting some strange coloring errors:

The grid included shows the top 10 countries with arable land per population. However, Australia is colored ...

- asked by DavisDude (1 vote)

—————————-

[Find regions in which the roots of a third degree polynomial are real] http://mathematica.stackexchange.com/questions/99167/find-regions-in-which-the-roots-of-a-third-degree-polynomial-are-real

I have to find the roots of a third degree polynomial in that depends from 3 parameters, namely . In order to do that I've used the command Solve, in the following way:

...

- asked by Claretta (5 votes)

—————————-

[Works with example numbers, but not with variables alone] http://mathematica.stackexchange.com/questions/99575/works-with-example-numbers-but-not-with-variables-alone

The following code prints the correct solution for variable a (2.23).

But if i comment out the 5 given example numbers on top it fails.

If i remove some of the constraints at the bottom (&& ...

- asked by JoDo (1 vote)

[How to draw cylinders inside a cube] http://mathematica.stackexchange.com/questions/98724/how-to-draw-cylinders-inside-a-cube

I want to create the following graphic (ignore the unit vectors).

What I do is the following (not the most elegent and smart way I guess:-)!):

1) Use the code below to generate randomly distributed ...

- asked by dimitris (23 votes), answered by ybeltukov (37 votes)

—————————-

[Sparse Cholesky Decomposition] http://mathematica.stackexchange.com/questions/98702/sparse-cholesky-decomposition

I am working with square matrices with a special form, which for

large rank ($> 100,000$) would be best stored and manipulated

as a SparseArray. I believe that the Cholesky decomposition of these ...

large rank ($> 100,000$) would be best stored and manipulated

as a SparseArray. I believe that the Cholesky decomposition of these ...

- asked by Eric Brown (17 votes), answered by J. M. (16 votes)

—————————-

[Histogram3D with various colors and textures on cuboids' faces] http://mathematica.stackexchange.com/questions/98687/histogram3d-with-various-colors-and-textures-on-cuboids-faces

I'm trying to produce an Histogram3D-like graph, but with a little more customization.

In particular I want to manually specify the color of each cuboid and to print some information on the top ...

- asked by glance (14 votes), answered by Taiki (10 votes)

—————————-

[Can anyone explain this weird Plot3D error?] http://mathematica.stackexchange.com/questions/98813/can-anyone-explain-this-weird-plot3d-error

This is more of a fun question because I see the source of the error, but cannot explain what Plot3D is doing. Can you figure it out?

- asked by lynvie (13 votes), answered by Michael E2 (6 votes)

—————————-

[Piecewise imposes internal boundaries in NDSolve - is this expected?] http://mathematica.stackexchange.com/questions/98734/piecewise-imposes-internal-boundaries-in-ndsolve-is-this-expected

In the following code I used True as the predicate for DirichletCondition and found that the boundary condition was applied not only at the boundary of the specified region but also at the internal ...

- asked by Simon Woods (13 votes), answered by user21 (8 votes)

—————————-

[What is the difference between a .wl package and a .m package?] http://mathematica.stackexchange.com/questions/98981/what-is-the-difference-between-a-wl-package-and-a-m-package

In Mathematica 10.x, one now has both .wl Wolfram Language Packages and .m Wolfram Mathematica Packages.

What's the difference? Is one of the two formats to be preferred in certain situations and, ...

- asked by murray (12 votes)

—————————-

[Defer, Hold, Unevaluated, Inactivate – which one when?] http://mathematica.stackexchange.com/questions/98874/defer-hold-unevaluated-inactivate-which-one-when

What are some guidelines on which function to select from among the superficially similar functions Defer, Hold, Unevaluated, and Inactivate?

Consider, for example:

- asked by murray (12 votes)

[Python-style plots in Mathematica] http://mathematica.stackexchange.com/questions/84877/python-style-plots-in-mathematica

I love making plots in Mathematica. And I love to spend a lot of time making high-quality plots that maximize readability and aesthetics. For most cases, Mathematica can make very beautiful images, ...

- asked by Pablo Galindo Salgado (49 votes), answered by halirutan (49 votes)

—————————-

- asked by belisarius has settled (278 votes), answered by Michael E2 (148 votes)

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

[How do I determine which ChartElementDataFunction is Automatic?] http://mathematica.stackexchange.com/questions/98820/how-do-i-determine-which-chartelementdatafunction-is-automatic

In the course of exploring @kglr's answer to Edmund's question gain

some insight into how I might answer my own question here, I came across the

undocumented System`ChartElementData function, which ...

some insight into how I might answer my own question here, I came across the

undocumented System`ChartElementData function, which ...

- asked by Pillsy (7 votes)

—————————-

[Control Front End in ”mathlink” mode] http://mathematica.stackexchange.com/questions/98686/control-front-end-in-mathlink-mode

Note: This question was already posted in the Wolfram community.

In a terminal math session, we can start a front end (FE) easily by launching it though LinkLaunch or by using functions provided in ...

- asked by halirutan (11 votes)

—————————-

[Multivariate Path Construction using Sobol numbers] http://mathematica.stackexchange.com/questions/98914/multivariate-path-construction-using-sobol-numbers

I am sharing my code,which I have tried to perform as per the instruction mentioned below. Please correct it so that I could get my output.

Instruction: Use the first m dimensions of the Sobol vector ...

- asked by Pankaj Mani (1 vote)

[Incorrect Timing of Total] http://mathematica.stackexchange.com/questions/98453/incorrect-timing-of-total

For demonstrating how fast C-compiled functions can be, in one of my courses I use the following function for finding the sum of a list of reals:

- asked by Fred Simons (17 votes), answered by ilian (12 votes)

—————————-

[Aggregation queries on lists of associations in 10.3] http://mathematica.stackexchange.com/questions/98277/aggregation-queries-on-lists-of-associations-in-10-3

Bug introduced in 10.3

Some aggregation queries applied to a list of associations (or Dataset's with this structure) lock up the front end or crash the kernel in Version 10.3.

- asked by Daniel W (14 votes), answered by SquareOne (7 votes)

—————————-

[On making a graphical real-time memory usage monitor] http://mathematica.stackexchange.com/questions/98205/on-making-a-graphical-real-time-memory-usage-monitor

I'd like to make a graphical version of

Dynamic[Refresh[MemoryInUse[], UpdateInterval -> 1]]

A naive implementation would be something like:

miu = {};

Dynamic[Refresh[ListPlot[AppendTo[miu, ...

A naive implementation would be something like:

miu = {};

Dynamic[Refresh[ListPlot[AppendTo[miu, ...

- asked by kjo (12 votes), answered by Karsten 7. (7 votes)

—————————-

[How to sort list of mixed types of elements with each type a specified canonical order?] http://mathematica.stackexchange.com/questions/98438/how-to-sort-list-of-mixed-types-of-elements-with-each-type-a-specified-canonical

For example, here is a list

{{1, "u"}, {6, "d"}, {3, "u"}, {4, "d"}, {2, "u"}, {5, "u"}, {3,

"d"}, {1, "d"}, {4, "u"}, {2, "d"}, {5, "d"}, {6, "u"}}

The default canonical order for integer is ...

"d"}, {1, "d"}, {4, "u"}, {2, "d"}, {5, "d"}, {6, "u"}}

The default canonical order for integer is ...

- asked by matheorem (11 votes), answered by belisarius is forth (14 votes)

—————————-

[How do you concatenate matrices? And how do you make block matrices?] http://mathematica.stackexchange.com/questions/98406/how-do-you-concatenate-matrices-and-how-do-you-make-block-matrices

This is pretty trivial to do in Matlab, but I have not seen a function for it in Mathematica. Here is how you can do it with Join and Transpose. Is there an easier way to do it than this?

...

- asked by luke wendt (10 votes), answered by Taiki (12 votes)

—————————-

[Association Subtotals with Lists as Keys] http://mathematica.stackexchange.com/questions/98346/association-subtotals-with-lists-as-keys

I have the following Association:

as = <|{5, 2, 1} -> 3, {6, 1, 4} -> 9, {5, 1, 9} -> 12, {5, 2, 4} -> 6, {6, 2, 8} -> 10|>;

I want to total the values on the right side of the ...

- asked by eldo (10 votes), answered by Pillsy (13 votes)

—————————-

[get position index for all element in a list] http://mathematica.stackexchange.com/questions/98170/get-position-index-for-all-element-in-a-list

For example

mat={{a,b},{c,a,a}}

How to write a function posindex that posindex[mat] will give

{{a -> {1, 1}, b -> {1, 2}}, {c -> {2, 1}, a -> {2, 2}, a -> {2, 3}}

And the function ...

How to write a function posindex that posindex[mat] will give

{{a -> {1, 1}, b -> {1, 2}}, {c -> {2, 1}, a -> {2, 2}, a -> {2, 3}}

And the function ...

- asked by matheorem (10 votes), answered by Michael E2 (8 votes)

[3D surface that looks like a virus] http://mathematica.stackexchange.com/questions/74193/3d-surface-that-looks-like-a-virus

I have been recently using Mathematica for composing animations that are part of the supplementary information of my papers.

I am currently trying to build an animation that involves a viral ...

- asked by user2098 (16 votes), answered by Chris Degnen (18 votes)

—————————-

[Mathematica Minecraft] http://mathematica.stackexchange.com/questions/19669/mathematica-minecraft

Some time ago I asked myself: with all these great graphics and interactive capabilities of Mathematica, what kinds of 3D games can be implemented in it? And the answer which came to mind is ...

- asked by faleichik (131 votes), answered by faleichik (176 votes)

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

[Triggering events based on choices made inside of system dialogs (e.g. window close)] http://mathematica.stackexchange.com/questions/98091/triggering-events-based-on-choices-made-inside-of-system-dialogs-e-g-window-cl

I'm trying to arrange for Mathematica to perform a certain action every time a notebook is saved or closed (with or without saving). The obvious way to do this would be through event handling. So, ...

- asked by Paco Jain (5 votes)

—————————-

[ListContourPlot and ListContourPlot3D use better interpolation for arrays of values than for lists of tuples (i.e. x,y,z,f[x,y,z]..] http://mathematica.stackexchange.com/questions/98145/listcontourplot-and-listcontourplot3d-use-better-interpolation-for-arrays-of-val

From reading the documentation, it seems that ListContourPlot3D should work equally well on an array versus a list of tuples,

- asked by Jason B (10 votes)

—————————-

[Size problems combining objects in a Graphics using Inset] http://mathematica.stackexchange.com/questions/98282/size-problems-combining-objects-in-a-graphics-using-inset

The Problem

I need to put together different graphics objects in a precise way inside a Graphics. Some objects are drawn directly by graphics primitives, some others are the result of calls to ...

- asked by Guido (4 votes)

[Recursively appending elements to a list] http://mathematica.stackexchange.com/questions/97684/recursively-appending-elements-to-a-list

In wanting to demonstrate the power of Mathematica, I wanted to show my 11-year-old son how we could validate that his sequences homework was correct. We could generate the next value in sequence in a ...

- asked by AnthonyMiller (15 votes), answered by J. M. (19 votes)

—————————-

[What is ”MemoryMonitor”?] http://mathematica.stackexchange.com/questions/97810/what-is-memorymonitor

Evaluating one of the following inputs

CurrentValue[EvaluationNotebook[], WindowElements]

CurrentValue[$FrontEndSession, WindowElements]

CurrentValue[$FrontEnd, WindowElements]

CurrentValue[$FrontEndSession, WindowElements]

CurrentValue[$FrontEnd, WindowElements]

...

- asked by Karsten 7. (12 votes), answered by m_goldberg (10 votes)

—————————-

[Pop-up documentation for ”The new function of the day”] http://mathematica.stackexchange.com/questions/97552/pop-up-documentation-for-the-new-function-of-the-day

The Wolfram Language has more than 5000 built-in functions and constants.

functionslist = Flatten[

Names[#] & /@ Flatten[

{# <> "*", "$" <> # <> "*"} &

/@ ...

Names[#] & /@ Flatten[

{# <> "*", "$" <> # <> "*"} &

/@ ...

- asked by rhermans (12 votes), answered by J. M. (5 votes)

—————————-

[ListContourPlot has wrong colouring: workaround?] http://mathematica.stackexchange.com/questions/97596/listcontourplot-has-wrong-colouring-workaround

ListContourPlot uses the wrong colouring here:

res = Import["https://dl.dropboxusercontent.com/u/38623/res.wdx", "WDX"];

ListContourPlot[res, Contours -> Range[0.66, 0.9, 0.02], ColorFunction ...

ListContourPlot[res, Contours -> Range[0.66, 0.9, 0.02], ColorFunction ...

- asked by Szabolcs (12 votes), answered by Jason B (9 votes)

—————————-

[How do you handle upgrade frequency now that minor releases come so quickly?] http://mathematica.stackexchange.com/questions/97493/how-do-you-handle-upgrade-frequency-now-that-minor-releases-come-so-quickly

Does anyone understand the Mathematica upgrade treadmill these days? With the minor releases (10.2, 10.3) coming out fairly quickly and the upgrade price associated with each, I have no idea what my ...

- asked by sblom (12 votes)

—————————-

[More efficient method to compute moments of the Johnson distribution] http://mathematica.stackexchange.com/questions/97750/more-efficient-method-to-compute-moments-of-the-johnson-s-b-distribution

Here is a very specific feature request. I need

Mean[JohnsonDistribution["SB", \[Gamma], \[Delta], 0, 1]]

When I issue e.g.

Table[N[Mean[JohnsonDistribution["SB", \[Gamma], \[Delta], 0, 1]]],

{\[Gamma], -10, 10}, {\[Delta], 1, 10}]

- asked by (11 votes), answered by J. M. (15 votes)

When I issue e.g.

Table[N[Mean[JohnsonDistribution["SB", \[Gamma], \[Delta], 0, 1]]],

{\[Gamma], -10, 10}, {\[Delta], 1, 10}]

- asked by (11 votes), answered by J. M. (15 votes)

—————————-

[Path Names Longer Then 256 on Windows] http://mathematica.stackexchange.com/questions/97736/path-names-longer-then-256-on-windows

Is there a way to work with pathnames that are longer then the typical 256 in Mathematica?

For example run the following in Cygwin

- asked by William (11 votes), answered by WReach (10 votes)

[Mathematica Minecraft] http://mathematica.stackexchange.com/questions/19669/mathematica-minecraft

Some time ago I asked myself: with all these great graphics and interactive capabilities of Mathematica, what kinds of 3D games can be implemented in it? And the answer which came to mind is ...

- asked by faleichik (131 votes), answered by faleichik (176 votes)

—————————-

[3D surface that looks like a virus] http://mathematica.stackexchange.com/questions/74193/3d-surface-that-looks-like-a-virus

I have been recently using Mathematica for composing animations that are part of the supplementary information of my papers.

I am currently trying to build an animation that involves a viral ...

- asked by user2098 (16 votes), answered by Chris Degnen (18 votes)

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

[How to model discontinuities in a NonlinearStateSpaceModel] http://mathematica.stackexchange.com/questions/97717/how-to-model-discontinuities-in-a-nonlinearstatespacemodel

I know that it is possible to model discontinuities like bouncing and other collisions by using WhenEvent with NDSolve.

However, I am using the tools for Non linear systems and I'd like to know if ...

- asked by RationalAsh (2 votes)

—————————-

[How to pass a custom method to a particular option?] http://mathematica.stackexchange.com/questions/97753/how-to-pass-a-custom-method-to-a-particular-option

In an answer to my question More efficient method to compute moments of the Johnson distribution, J. M. has come up with a method to compute the moments of the Johnson distribution, which ...

—————————-

[Scaling 1D ArrayPlot divide by zero error] http://mathematica.stackexchange.com/questions/97467/scaling-1d-arrayplot-divide-by-zero-error

I am trying to overlay an ArrayPlot onto a WaveletScalogram, using the helpful answer here; however, my ArrayPlot is one-dimensional.

My code:

- asked by Lylax (2 votes)

[DumpSave 10.2 style from 10.3] http://mathematica.stackexchange.com/questions/97357/dumpsave-10-2-style-from-10-3

Szabolcs has asked WRI support about mx files, in particular:

Can we expect that MX files written by Mathematica 10.0.0 will be readable by future point released such as 10.0.1 or 10.0.2?

...

- asked by Kuba (14 votes)

—————————-

[Plot3D is incorrectly returning ”1/0. encountered”] http://mathematica.stackexchange.com/questions/97104/plot3d-is-incorrectly-returning-1-0-encountered

The line of code

is returning several ”Power::infy: Infinite expression 1/0. encountered.” error messages, and then returning an empty plot. But the ...

- asked by tparker (13 votes), answered by rhermans (8 votes)

—————————-

[Fast Selections Testing on Inequality] http://mathematica.stackexchange.com/questions/97083/fast-selections-testing-on-inequality

Is there a functional idiom for fast selections testing on inequality?

For example, finding values from list a & b where the key is less than or equal to a value, in this case 4 or 9.

An ...

- asked by Chris Degnen (13 votes), answered by Chris Degnen (5 votes)

—————————-

[Generate two random numbers with constraint] http://mathematica.stackexchange.com/questions/97424/generate-two-random-numbers-with-constraint

I want to generate two random numbers p and q between 0.5 and 1. They are connected by the following constraint . How to do that?

- asked by Chandan Datta (12 votes), answered by rhermans (18 votes)

—————————-

[How to evaluate the second argument of Cases only once] http://mathematica.stackexchange.com/questions/96939/how-to-evaluate-the-second-argument-of-cases-only-once

I'd like to find a fast but readable way to achieve the following:

Cases[RandomInteger[{AbsoluteTime["2001"], AbsoluteTime["2003"]}, 1000],

a_ /; a > AbsoluteTime["2002"]]

a_ /; a > AbsoluteTime["2002"]]

The correct result ...

- asked by Italianice (10 votes), answered by Michael E2 (11 votes)

—————————-

[How to predict the degree of the first series coefficient?] http://mathematica.stackexchange.com/questions/97313/how-to-predict-the-degree-of-the-first-series-coefficient

Given an expression f that is a function of x and a number x0, what is the least integer n that produces a non-zero coefficient in Series[f, x, x0, n]?

[1] For instance, here, is the answer is n = ...

- asked by Michael E2 (9 votes), answered by bbgodfrey (0 votes)

—————————-

[Trying to find the asymptote to a function] http://mathematica.stackexchange.com/questions/97365/trying-to-find-the-asymptote-to-a-function

I am trying to find the asymptote to a solution of a differential equation.

I solved $x'(t) = \sin(x(t) + t)$ using NDSolve and plotted my solution.

sol = NDSolve[{x'[t] == Sin[x[t] + t], x[0] == ...

sol = NDSolve[{x'[t] == Sin[x[t] + t], x[0] == ...

- asked by Jacobadtr (9 votes), answered by bbgodfrey (9 votes)

[Generating visually pleasing circle packs] http://mathematica.stackexchange.com/questions/40334/generating-visually-pleasing-circle-packs

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did.

I would like to ...

- asked by VividD (86 votes), answered by level1807 (51 votes)

—————————-

[Is there a syntax for single-line comments for notebooks?] http://mathematica.stackexchange.com/questions/1496/is-there-a-syntax-for-single-line-comments-for-notebooks

I'm aware that I can use (* ... *) to comment out stuff in a notebook. Many languages have a syntax for single-line comments, such as

- asked by Peeter Joot (35 votes), answered by Szabolcs (42 votes)

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

[SyntaxInformation: take allowed options from multiple symbols – possible?] http://mathematica.stackexchange.com/questions/97411/syntaxinformation-take-allowed-options-from-multiple-symbols-possible

Suppose I have a function like

Options[f] = {foo -> 1};

f[opt : OptionsPattern[{f,g}]] := h@g[Sequence @@ FilterRules[{opt}, Options[g]]]

f[opt : OptionsPattern[{f,g}]] := h@g[Sequence @@ FilterRules[{opt}, Options[g]]]

I purposefully do not want to append Options[g] to ...

- asked by Szabolcs (4 votes)

—————————-

[Is there any way to export vector graphics with shading?] http://mathematica.stackexchange.com/questions/97305/is-there-any-way-to-export-vector-graphics-with-shading

This has irked me for a while as I really feel its a significant shortfall in Mathematica's abilities but maybe I am missing something.

I would like to export simple graphics with shading in a ...

- asked by Quantum_Oli (9 votes)

—————————-

[Why is 13 the smaller height dimension of a Graphics?] http://mathematica.stackexchange.com/questions/97364/why-is-13-the-smaller-height-dimension-of-a-graphics

It seems that you cannot get a Graphics image with a height dimension less than 13. Trying to draw something and then asking for the ImageDimensions of the resulting Graphics, you will get three ...

- asked by Guido (6 votes)

[Progress bar for FullSimplify] http://mathematica.stackexchange.com/questions/96602/progress-bar-for-fullsimplify

Sometimes FullSimplify takes a really long time and it is not really clear if it makes sense to wait another half an hour in hopes for it to finish, or if it will actually take three years in which ...

- asked by Kagaratsch (18 votes), answered by Sjoerd C. de Vries (26 votes)

—————————-

[Construct a master curve from data] http://mathematica.stackexchange.com/questions/96393/construct-a-master-curve-from-data

I will try to be as informative as possible.

Clear["Global`*"]

I have the following data

data91 = {{-0.209091`, 2.89296`}, {0.281818`, 2.92958`}, {0.8`,

2.97535`}, {1.28182`, 3.03028`}, ...

I have the following data

data91 = {{-0.209091`, 2.89296`}, {0.281818`, 2.92958`}, {0.8`,

2.97535`}, {1.28182`, 3.03028`}, ...

- asked by dimitris (11 votes), answered by Sjoerd C. de Vries (17 votes)

—————————-

[Upper bound ”Vicious nearest neighbour” algorithm suggestions] http://mathematica.stackexchange.com/questions/96691/upper-bound-vicious-nearest-neighbour-algorithm-suggestions

I am asking a question based on this question from the sister site MSE.

In an effort to make this a self-contained question, I include the fiorst documented posing of the problem by Robert Abilock in ...

- asked by martin (10 votes), answered by Arnoud Buzing (2 votes)

—————————-

[Symbolic sum of Stirling numbers gives wrong answer] http://mathematica.stackexchange.com/questions/96575/symbolic-sum-of-stirling-numbers-gives-wrong-answer

This issue originated from my attempt to answer a question on MathOverflow:

on Mathematica 10.2.0.0 gives as answer , while the ...

- asked by Carlo Beenakker (10 votes), answered by Bob Hanlon (6 votes)

—————————-

[Map a function of several arguments] http://mathematica.stackexchange.com/questions/96803/map-a-function-of-several-arguments

I have three lists, e.g.

list1 = {{a,b,...}};

list2 = {{1,2},{3,4},...};

list3 = {{x,y},{z,w},...};

and a function

f[x_,y_]:=(* whatever it does *);

list2 = {{1,2},{3,4},...};

list3 = {{x,y},{z,w},...};

and a function

f[x_,y_]:=(* whatever it does *);

I need to get

...

- asked by T. Rihacek (10 votes), answered by Kuba (12 votes)

—————————-

[Why does Nearest not support Sqrt?] http://mathematica.stackexchange.com/questions/96588/why-does-nearest-not-support-sqrt

Simple examples with two points

This is incorrect. If we test bigger radius, we can find that Mathematica takes ...

- asked by matheorem (9 votes)

—————————-

[Unique Element in List] http://mathematica.stackexchange.com/questions/96747/unique-element-in-list

I have a list a, and want to find out whether there is a unique element in the list.

For instance a=x,y,z,y,x has an unique element (z), while a=1,2,3,4,5,1,2,3,4,5 has no unique element.

There ...

- asked by NicoDean (8 votes), answered by J. M. is back. (11 votes)

[1 Plot, 2 Scale/Axis] http://mathematica.stackexchange.com/questions/627/1-plot-2-scale-axis

I would like to plot those two datasets on top of each other. But they have very different range on the axis. How can I have two different axis?

I found the following on the help menu but quite ...

- asked by 500 (87 votes), answered by ArgentoSapiens (83 votes)

—————————-

[Mathematica Minecraft] http://mathematica.stackexchange.com/questions/19669/mathematica-minecraft

- asked by faleichik (131 votes), answered by faleichik (175 votes)

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

[Examples of using Mathematica to solve matrix equations symbolically] http://mathematica.stackexchange.com/questions/96405/examples-of-using-mathematica-to-solve-matrix-equations-symbolically

Suppose we want to solve a linear system like

- asked by fred (5 votes)

—————————-

[General suggestions to accelerate Simplify and FullSimplify] http://mathematica.stackexchange.com/questions/96476/general-suggestions-to-accelerate-simplify-and-fullsimplify

To my understanding, the function Simplify[] and FullSimplify[] work by applying a series of built-in transformation rules to the expression and trying to minimize the TransformationFunctions in the ...

- asked by Yuchen Xie (1 vote)

—————————-

[External and internal Assumptions on ‘PiecewiseExpand‘ and ‘Mod‘] http://mathematica.stackexchange.com/questions/96596/external-and-internal-assumptions-on-piecewiseexpand-and-mod

After this question I'm intrigued about the different behaviors depending where and how the assumptions are given.

- asked by rhermans (5 votes)

[How to simplify writing LibraryLink code?]( http://mathematica.stackexchange.com/questions/96127/how-to-simplify-writing-librarylink-code)

LibraryLink is an API for extending Mathematica through C or C++. It is very fast because it gives direct access to Mathematica's packed array data structure, without even needing to make a copy of ...

- asked by Szabolcs (22 votes), answered by Szabolcs (20 votes)

—————————-

[Find the volume of Phobos and Deimos]( http://mathematica.stackexchange.com/questions/96125/find-the-volume-of-phobos-and-deimos)

How can we calculate the volume of a 3D object using the new-in-10 computational geometry functions?

For simple objects this works:

- asked by Szabolcs (17 votes), answered by I_Mariusz (7 votes)

—————————-

[Convert binary voxel image to geometric region] (http://mathematica.stackexchange.com/questions/96134/convert-binary-voxel-image-to-geometric-region)

I have a binary voxel image which described a contiguous region in space.

Example:

arr = Array[

Function[{x, y, z}, (1 + Sin[5 x] Sin[5 y] Sin[5 z]/2) - (x^2 + y^2 + z^2)],

{100, 100, 100}, ...

Function[{x, y, z}, (1 + Sin[5 x] Sin[5 y] Sin[5 z]/2) - (x^2 + y^2 + z^2)],

{100, 100, 100}, ...

- asked by Szabolcs (14 votes), answered by Simon Woods (5 votes)

—————————-

[Is it possible to reference ”self” from a pure function?]( http://mathematica.stackexchange.com/questions/96220/is-it-possible-to-reference-self-from-a-pure-function)

This would calculate the factorial of 6, if the ”self” was the function itself. Is there something that could allow this?

- asked by MathematicaUser39386 (13 votes), answered by Leonid Shifrin (19 votes)

—————————-

[Circle with negative radius?]( http://mathematica.stackexchange.com/questions/96102/circle-with-negative-radius)

Why does this work:

But this doesn't?

Telling me:

Radius -0.78539816339744828 should be a positive number or pair of ...

- asked by David (12 votes)

—————————-

[DSolve documention on web differs greatly from distributed MMA 10.2.0 version] (http://mathematica.stackexchange.com/questions/96089/dsolve-documention-on-web-differs-greatly-from-distributed-mma-10-2-0-version)

In the course of improving my answer to 95361, I noticed that the DSolve documentation on the web is much better written than that distributed with Mathematica 10.2.0 for Microsoft Windows (64-bit) ...

- asked by bbgodfrey (10 votes), answered by Karsten 7. (5 votes)

—————————-

[MapAt with Replace(All) causing kernel crash]( http://mathematica.stackexchange.com/questions/96193/mapat-with-replaceall-causing-kernel-crash)

Bug introduced in 10.1 and fixed in 10.2

I wanted to roll a function that works like /. but only acts on the very first match it encounters.

- asked by LLlAMnYP (9 votes), answered by LLlAMnYP (4 votes)

[3D surface that looks like a virus] (http://mathematica.stackexchange.com/questions/74193/3d-surface-that-looks-like-a-virus)

I have been recently using Mathematica for composing animations that are part of the supplementary information of my papers.

I am currently trying to build an animation that involves a viral ...

- asked by user2098 (16 votes), answered by Chris Degnen (18 votes)

—————————-

[Trying to Visualize a Collatz - The Collatz conjecture]( http://mathematica.stackexchange.com/questions/85718/trying-to-visualize-a-collatz-the-collatz-conjecture)

So I'm new in this and learning— and I happen to have this collatz

So i want a visual 3D adjacency graph of my ...

- asked by Mia (23 votes), answered by Sjoerd C. de Vries (27 votes)

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

[How to ”fake” a front-end object when running a Mathematica script?] (http://mathematica.stackexchange.com/questions/95779/how-to-fake-a-front-end-object-when-running-a-mathematica-script)

I'm running a Mathematica script (content of which cannot be disclosed here) and some part of it requires ”front-end”? Since it's running in a script, there is not one and it gave the following error: ...

- asked by qazwsx (3 votes)

—————————-

[INTERNAL SELF-TEST ERROR: FileNotify—c—305]( http://mathematica.stackexchange.com/questions/96273/internal-self-test-error-filenotifyc305)

Does anybody know what this error means? Clicking the link in the warning message gives a ”page not found”, and Googling does not produce anything for this exact error code. I get it whenever I try to ...

- asked by Marius Ladegard Meyer (3 votes)

—————————-

[Does Compilation option ”InlineExternalDefinitions”/”InlineCompiledFunctions” lead to unnecessarily complicated nesting?] (http://mathematica.stackexchange.com/questions/96147/does-compilation-option-inlineexternaldefinitions-inlinecompiledfunctions-le)

Question: When an external (possibly complicated) definition f

is used inside a compiled function with

CompilationOption->{"InlineCompiledFunctions"->True},

does Mathematica really store the ...

is used inside a compiled function with

CompilationOption->{"InlineCompiledFunctions"->True},

does Mathematica really store the ...

- asked by QuantumDot (4 votes)

[Fast calculation of discrete logarithms] http://mathematica.stackexchange.com/questions/95590/fast-calculation-of-discrete-logarithms

Does Mathematica have any built-in fast algorithms for calculating discrete logarithms over (the group of integers modulo )?

Essentially, for a fixed large prime p, a ...

- asked by 2012rcampion (15 votes)

—————————-

[What pseudo-random number generators are available to Mathematica users?] http://mathematica.stackexchange.com/questions/95533/what-pseudo-random-number-generators-are-available-to-mathematica-users

One would think I should be able answer the question I pose in the title for myself by reading the Documentation Center article ref/SeedRandom, but it's not so simple.

That article does give a list ...

- asked by m_goldberg (13 votes), answered by ilian (15 votes)

—————————-

[Efficient conversion between two partition representations] http://mathematica.stackexchange.com/questions/95410/efficient-conversion-between-two-partition-representations

I have a list of distinct expressions. We can represent a partitioning of list in two ways:

As a list of sublists partitions = a, b, ..., x, y, ..., ....

As a vector of integer partition ...

- asked by Szabolcs (12 votes), answered by Leonid Shifrin (12 votes)

—————————-

[Why do singularities disappear when performing convolutions with the Dirac Delta function?] (http://mathematica.stackexchange.com/questions/95588/why-do-singularities-disappear-when-performing-convolutions-with-the-dirac-delta)

I am attempting to perform a convolution involving the Dirac Delta function:

I would expect that the result of this integral is ...

- asked by Peter Crowley (11 votes), answered by I_Mariusz (1 vote)

—————————-

[Determine height of box packed with spheres] (http://mathematica.stackexchange.com/questions/95566/determine-height-of-box-packed-with-spheres)

I got such a wonderful answer regarding The Diagonals of a Regular Octagon, so I thought I'd try asking another question we had on our Pizza and Problem quiz activity at College of the Redwoods. The ...

- asked by David (10 votes), answered by KennyColnago (10 votes)

—————————-

[How to automatically remove text from images?] (http://mathematica.stackexchange.com/questions/95512/how-to-automatically-remove-text-from-images)

I'd like to remove the text in the center of images automatically. To use Inpaint[], you need a mask, but I don't have one. So really the problem is:

How to build a mask for an image that contains a ...

- asked by M.R. (10 votes), answered by blochwave (36 votes)

—————————-

[Front ends gone wild with named slots] (http://mathematica.stackexchange.com/questions/95351/front-ends-gone-wild-with-named-slots)

Bug introduced in version 10

Assume the following simple expression

Now go in front of the # and just start typing another named slot expression. On my system, the front end ...

- asked by halirutan (10 votes)

[Python-style plots in Mathematica] http://mathematica.stackexchange.com/questions/84877/python-style-plots-in-mathematica

I love making plots in Mathematica. And I love to spend a lot of time making high-quality plots that maximize readability and aesthetics. For most cases, Mathematica can make very beautiful images, ...

- asked by Pablo Galindo Salgado (48 votes), answered by halirutan (49 votes)

—————————-

[How to find all the local minima/maxima in a range] http://mathematica.stackexchange.com/questions/5575/how-to-find-all-the-local-minima-maxima-in-a-range

I want to find :

all local maxima in range

all local minima in range

From those points I can interpolate and combine functions upper and lower boundary. What I am really interested in, is the ...

- asked by Margus (51 votes), answered by Daniel Lichtblau (55 votes)

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

[Time complexity to choose the right overload from the memoized function] http://mathematica.stackexchange.com/questions/95399/time-complexity-to-choose-the-right-overload-from-the-memoized-function

If we want to save some outputs of the function, we often use the memoization pattern as follows,

If I call this function many times for different arguments, ...

- asked by Sungmin (7 votes)

—————————-

[Diagonalisation of equations for NDSolve] http://mathematica.stackexchange.com/questions/95383/diagonalisation-of-equations-for-ndsolve

I have a linear matrix differential equation and I wish to speed up evaluation by diagonalising using eigenvectors. There is an example in Help for finite elements under ”swinging beam” that is ...

- asked by Hugh (2 votes)

—————————-

[TableDirections example produces an error message] http://mathematica.stackexchange.com/questions/95321/tabledirections-example-produces-an-error-message

Bug introduced in 10.0 and persisting through in 10.2

Can anyone replicate this? In Mathematica 10.2 on Win 64:

I get the ...

- asked by Alan (9 votes)

[How to speed up PDF export in Mathematica 10] (http://mathematica.stackexchange.com/questions/94776/how-to-speed-up-pdf-export-in-mathematica-10)

Based on this question: - Version 7 print environment - I set up two 10 page test documents in version 7.0.1 and version 10.1. The version 7 document exported to PDF in 4.18 seconds whereas the ...

- asked by Chris Degnen (19 votes)

—————————-

[How can I import a huge CSV file quickly?] (http://mathematica.stackexchange.com/questions/94752/how-can-i-import-a-huge-csv-file-quickly)

I have two CSV files, each one is around 1 GB of data. When I use Import[”file.csv”], it takes a very, very, long time to import the data. So how can I accelerate the import procedure?

The file ...

- asked by m00nlight (17 votes), answered by tesseract (12 votes)

—————————-

[Is it possible to change the order that symbol definitions are checked? (DownValues vs UpValues)] (http://mathematica.stackexchange.com/questions/95087/is-it-possible-to-change-the-order-that-symbol-definitions-are-checked-downval)

Suppose I have the function f with the following definition assigned to it:

f // ClearAll;

f // Attributes = { HoldAll };

f /: HoldPattern[ f[x_] + f[y_] ] := upvalue;

If I evaluate f[x] + f[y], I ...

f // Attributes = { HoldAll };

f /: HoldPattern[ f[x_] + f[y_] ] := upvalue;

If I evaluate f[x] + f[y], I ...

- asked by rhennigan (15 votes), answered by halirutan (9 votes)

—————————-

[Is it a bug in Limit?](http://mathematica.stackexchange.com/questions/95052/is-it-a-bug-in-limit)

Bug introduced in 9.0 and fixed in 10.0.0

Mathematica 9 on Windows and WolframAlpha says

But actually the limit is 0.

...

- asked by user15961 (13 votes)

—————————-

[Add a vector to a list of vectors]( http://mathematica.stackexchange.com/questions/95033/add-a-vector-to-a-list-of-vectors)

What is the syntax to add v1 to each vector in v2? I know it has to be simple, but I really have searched and not found it.

i.e., sum them in ...

- asked by DrBubbles (12 votes), answered by Artes (16 votes)

—————————-

[How to remove a LocalSymbol (or CloudSymbol)?] (http://mathematica.stackexchange.com/questions/94978/how-to-remove-a-localsymbol-or-cloudsymbol)

In version 10.2 LocalSymbol can be used to create a persistent store of a variable. Once this is created I don't see a method to remove it. How are are they removed.

...

- asked by Edmund (11 votes), answered by ilian (11 votes)

—————————-

[How can I route edges manually for a Graph?] (http://mathematica.stackexchange.com/questions/95013/how-can-i-route-edges-manually-for-a-graph)

Most graph layouts supported by Mathematica use straight lines for edges; or at least something that only depends on the coordinates of the two adjacent vertices of the edge and nothing else.

A ...

- asked by Szabolcs (10 votes), answered by Silvia (9 votes)

Greatest hits from previous weeks:

==================================

[Elegant operations on matrix rows and columns] (http://mathematica.stackexchange.com/questions/3069/elegant-operations-on-matrix-rows-and-columns)

Question

The Mathematica tutorial has a section 'Basic Matrix Operations', describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

- asked by sjdh (91 votes), answered by Mr.Wizard (31 votes)

—————————-

[How to make use of Associations?]( http://mathematica.stackexchange.com/questions/52393/how-to-make-use-of-associations)

...

- asked by Yi Wang (89 votes), answered by Leonid Shifrin (100 votes)

[Why is an imported plot different from the saved one?] (http://mathematica.stackexchange.com/questions/94757/why-is-an-imported-plot-different-from-the-saved-one)

I have a question concerning the importing of previously saved graphics. So I drew a plot in Mathematica and saved it by right clicking on it and saving it (”save as...”). When I open this (.pdf) ...

- asked by drabus (2 votes)

—————————-

[Number of 4-colorings of Johnson solids] (http://mathematica.stackexchange.com/questions/95066/number-of-4-colorings-of-johnson-solids)

I want to know the number of 4-colorings for all Johnson solids. This is equivalent to evaluating the flow polynomial for the corresponding polyhedral graphs at .

I tried the following to get ...

- asked by Athanasios Evangelou (4 votes)

—————————-

[How to have Mathematica pronounce/speak International Phonetic Alphabet?] (http://mathematica.stackexchange.com/questions/95068/how-to-have-mathematica-pronounce-speak-international-phonetic-alphabet)

We know that Speak could read out English words and sentences such as

Speak["this is a sentence"]

Unfortunately, Speak only works for English. Speak[" "] will only yield silence.

Unfortunately, Speak only works for English. Speak[" "] will only yield silence.

In fact ...

- asked by Harry (3 votes)

[Spacing out random walks so they don't overlap] (http://mathematica.stackexchange.com/questions/94363/spacing-out-random-walks-so-they-dont-overlap)

From an external simulation program, I have lots of particle tracks which follow random walks, all of which start at or near the origin . This means that when I plot the walks in Mathematica, ...

- asked by blochwave (20 votes), answered by kirma (8 votes)

—————————-

[How to avoid the wiggly text on Ticks and Labels when rotating 3D objects] (http://mathematica.stackexchange.com/questions/94470/how-to-avoid-the-wiggly-text-on-ticks-and-labels-when-rotating-3d-objects)

Motivation

I'm trying to do a nice animation of the rotation of a ParametricPlot3D . My problem is that the Ticks numbers and AxesLabel text wiggle with an undesirable noisy component as the ...

- asked by rhermans (16 votes), answered by P. Fonseca (8 votes)

—————————-

[Efficiently generating 2-D Gaussian random fields on the sphere] (http://mathematica.stackexchange.com/questions/94390/efficiently-generating-2-d-gaussian-random-fields-on-the-sphere)

Context

A couple of years ago I posted this question for an efficient code to generate an n-D Gaussian random field (sometimes called processes in other fields of research), which has applications in ...

- asked by chris (15 votes)

—————————-

[Pattern does not match with Orderless head] (http://mathematica.stackexchange.com/questions/94432/pattern-does-not-match-with-orderless-head)

Why does the following pattern matching not succeed?

ClearAll[f];

SetAttributes[f,Orderless];

HoldForm[f[a,d[],b,c]]/.HoldPattern[f[a,d[],b,z_]]:>{z}

(* f[a,d[],b,c] *)

SetAttributes[f,Orderless];

HoldForm[f[a,d[],b,c]]/.HoldPattern[f[a,d[],b,z_]]:>{z}

(* f[a,d[],b,c] *)

I expected that because f ...

- asked by bdforbes (14 votes), answered by Mr.Wizard (8 votes)

—————————-

[What are the requirements for a well behaved indexed variable? Subscript, ToExpression, Downvalue?] (http://mathematica.stackexchange.com/questions/94294/what-are-the-requirements-for-a-well-behaved-indexed-variable-subscript-toexpr)

On writing this answer I needed to call a function, (NonlinearModelFit) with an unknown number of parameters.

We have learned that we should not use Subscript for indexing variables because ...

- asked by rhermans (14 votes), answered by Leonid Shifrin (14 votes)

—————————-

[What is wrong with RuleCondition here?] (http://mathematica.stackexchange.com/questions/94413/what-is-wrong-with-rulecondition-here)

Hold@1`5 /. x_Real :> RuleCondition[N@x, True]

Hold@1`5 /. x_Real :> RuleCondition[N@2`5, True]

Hold@2`5 /. x_Real :> RuleCondition[N@2`5, True]

Hold@1`5 /. x_Real :> RuleCondition[N@t, ...

Hold@1`5 /. x_Real :> RuleCondition[N@2`5, True]

Hold@2`5 /. x_Real :> RuleCondition[N@2`5, True]

Hold@1`5 /. x_Real :> RuleCondition[N@t, ...

- asked by Chris Chiasson (12 votes), answered by Oleksandr R. (10 votes)

—————————-

[ regression in v10]( http://mathematica.stackexchange.com/questions/94296/tt-addto-regression-in-v10)

As we know we can assign special addition rules to symbols by using UpValues:

They are used when we directly add something to mySymbol

...

- asked by jkuczm (12 votes), answered by Bob Hanlon (6 votes)

[Elegant operations on matrix rows and columns] (http://mathematica.stackexchange.com/questions/3069/elegant-operations-on-matrix-rows-and-columns)

Question

The Mathematica tutorial has a section 'Basic Matrix Operations', describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

- asked by sjdh (90 votes), answered by Mr.Wizard (31 votes)

—————————-

[What are the most common pitfalls awaiting new users?] (http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users)

- asked by belisarius (266 votes), answered by Michael E2 (142 votes)

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

[Interfacing Red Pitaya board with Mathematica] (http://mathematica.stackexchange.com/questions/94493/interfacing-red-pitaya-board-with-mathematica)

I just discovered the Red Pitaya board and borrowed a unit to play during this weekend. Surprisingly I did not find any reference to Mathematica on the Red Pitaya forum, nor did I find any reference ...

- asked by Christian Neel (6 votes)

—————————-

[Using NMaximize to get integer results for a fractional programming problem] (http://mathematica.stackexchange.com/questions/94549/using-nmaximize-to-get-integer-results-for-a-fractional-programming-problem)

I have an optimization problem that I am trying to model in mathematica (wolfram cloud, to be precise).

Link to notebook for code described here: ...

- asked by pyrex (3 votes)

—————————-

[How to speed up summing a large number of vectors] (http://mathematica.stackexchange.com/questions/94660/how-to-speed-up-summing-a-large-number-of-vectors)

First let me explain what I am trying to do in my code.

Assume that I send a very short chirp (2,000 ms long) into a domain filled with 20,000 particles randomly scattered in the domain.

The ...

- asked by Mahdi Razaz (3 votes)

[Mathematica 10.0.x freezes in Initializing kernels] (http://mathematica.stackexchange.com/questions/92931/mathematica-10-0-x-freezes-in-initializing-kernels)

I updated to Windows 10 and have been running Mathematica fine on it for over a month. For some reason, it has just stopped working. I don't remember any Windows updates occurring which would have ...

- asked by mitcheljh (41 votes), answered by ilian (54 votes)

—————————-

[How to restore corrupted files?] (http://mathematica.stackexchange.com/questions/92814/how-to-restore-corrupted-files)

I have a file that I can't reopen because MMa was ”Not Responding” and I had to shut it down.

I found links online to this: http://support.wolfram.com/kb/12423

I executed those two instructions in a ...

- asked by Jerry Guern (13 votes), answered by Lou (11 votes)

—————————-

[No help from ?-command] (http://mathematica.stackexchange.com/questions/94165/no-help-from-command)

I recently upgraded to Mathematica 10.2, and there seem to be a problem with the help system. When typing

?Integrate

I get the following output

- asked by mickep (12 votes), answered by ilian (11 votes)

—————————-

[Syntax for using Tooltip in DiscretePlot] (http://mathematica.stackexchange.com/questions/93990/syntax-for-using-tooltip-in-discreteplot)

Tooltip works fine in ListPlot:

in which the decimal value of the distribution at a point is revealed when a cursor is placed ...

- asked by David G. Stork (10 votes), answered by march (10 votes)

—————————-

[Fast way to pass an array of integers to Java using JLink] (http://mathematica.stackexchange.com/questions/92878/fast-way-to-pass-an-array-of-integers-to-java-using-jlink)

I am using a package from java to compress a list of integers, this package provide me two methods, one for compress and other one for uncompress. Each of these methods has a version to int [] arrays ...

- asked by d555 (10 votes), answered by Leonid Shifrin (8 votes)

—————————-

[How to share a notebook?] (http://mathematica.stackexchange.com/questions/92848/how-to-share-a-notebook)

I have a folder in dropbox syncing to my desktop. I tried sharing a notebook file this way, but this generates lots of errors, conflicts, and data loss:

I have notebooks with Dynamic and other ...

- asked by M.R. (10 votes), answered by MarcoB (9 votes)

—————————-

[How do I remove roads from Mathematica maps?] (http://mathematica.stackexchange.com/questions/93976/how-do-i-remove-roads-from-mathematica-maps)

I'm using GeoGraphics and Polygon[Interpreter[”USState”][”Colorado”]] to create a map of Colorado and several bordering states. With automatic GeoStyling, I get a decent map with cities and roads ...

- asked by mmta no0b (9 votes), answered by Chip Hurst (17 votes)

Greatest hits from previous weeks:

==================================

[Alternatives to Mathematica] (http://mathematica.stackexchange.com/questions/28162/alternatives-to-mathematica)

Inspired by the recent question Alternatives to LaTeX (currently 58 upvotes) on http://tex.stackexchange.com/

Are there any paid-for or open source alternatives to Mathematica which produce equal or ...

- asked by akk (28 votes), answered by Sumit (18 votes)

—————————-

[What are the most common pitfalls awaiting new users?] (http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users)

- asked by belisarius (264 votes), answered by Michael E2 (141 votes)

[Help nedeed for understanding NDSolve architecture -Vacuum Heating Simulation] (http://mathematica.stackexchange.com/questions/94163/help-nedeed-for-understanding-ndsolve-architecture-vacuum-heating-simulation)

I am a beginner in mathematica and I am facing a problem that is way bigger than my knowledge..

I am tryng to simulate a semplificated version of Brunel Effect, wich is a Laser-Plasma interaction ...

- asked by Cosimo (2 votes)

—————————-

[Strange behavior of autocomplete for ColorData] (http://mathematica.stackexchange.com/questions/94135/strange-behavior-of-autocomplete-for-colordata)

I'm seeing very weird behavior when autocompleting:

Not sure if this is a bug. Is it?

(I have OSX v10.2)

- asked by M.R. (5 votes)

—————————-

[Open file menu bug with ubuntu dark theme] (http://mathematica.stackexchange.com/questions/92825/open-file-menu-bug-with-ubuntu-dark-theme)

I'm using Mathematica on a Ubuntu with a dark theme. When I click on the open file menu option, it shows up with a white background and white letters. I can only see something if the folder or file is ...

- asked by Hugo Andrade (3 votes)

[Advice for Mathematica as Mathematician's Aid] (http://mathematica.stackexchange.com/questions/92686/advice-for-mathematica-as-mathematicians-aid)

- asked by CarlEdman (29 votes), answered by MarcoB (20 votes)

[How can I evaluate untrusted Mathematica code in a sandbox?] (http://mathematica.stackexchange.com/questions/92347/how-can-i-evaluate-untrusted-mathematica-code-in-a-sandbox)

Is there any way to build a sandbox to evaluate untrusted Mathematica expressions in order to prevent them from having (malicious or accidental) harmful side effects?

Context: I'm developing a system ...

- asked by ibeatty (21 votes), answered by Stefan R (10 votes)

[Efficient lazy weak compositions] (http://mathematica.stackexchange.com/questions/92647/efficient-lazy-weak-compositions)

In Mathematica all weak k-compositions of integer n can be generated using permutations of integer partitions:

- asked by jkuczm (19 votes), answered by jkuczm (18 votes)

[SeriesData sucks when it can. How do I keep SeriesData from sucking?] (http://mathematica.stackexchange.com/questions/92646/seriesdata-sucks-when-it-can-how-do-i-keep-seriesdata-from-sucking)

When I run

Series[f[x]*Sin[x],{x,0,3}, Analytic->False]

I get:

f[x](x-x^3/3+O[x]^4)

as expected. In FullForm, this is

Times[f[x],SeriesData[x,0,List[1,0,Rational[-1,6]],1,4,1]]

But ...

I get:

f[x](x-x^3/3+O[x]^4)

as expected. In FullForm, this is

Times[f[x],SeriesData[x,0,List[1,0,Rational[-1,6]],1,4,1]]

But ...

- asked by QuantumDot (16 votes)

[How to zero (or replace) the diagonal of a square matrix?] (http://mathematica.stackexchange.com/questions/92666/how-to-zero-or-replace-the-diagonal-of-a-square-matrix)

Zeroing the diagonal of a square matrix is an operation I need frequently, but somehow I still haven't managed to find an elegant solution that satisfies all these requirements:

works with both ...

- asked by Szabolcs (14 votes), answered by ciao (12 votes)

[Splitting a list into increasing sublists] (http://mathematica.stackexchange.com/questions/92527/splitting-a-list-into-increasing-sublists)

I have a list of numbers (say, for example, 1,2,3,4,3,2,1,2,3,4,3,2), and I want to split it into sublists so that each sublist is the (smallest) sublist whose sum is larger than the preceding one. ...

- asked by rogerl (14 votes), answered by Chris Degnen (4 votes)

[How to detect loops in a vector field?] (http://mathematica.stackexchange.com/questions/92425/how-to-detect-loops-in-a-vector-field)

Given a vector field and I'd like to detect if there are streamlines in closed patterns. For example, if the input is a vector field like this:

- asked by M.R. (14 votes), answered by nikie (19 votes)

Greatest hits from previous weeks:

==================================

[Understanding differences between Maple and Mathematica in examples picked by Maplesoft] (http://mathematica.stackexchange.com/questions/60124/understanding-differences-between-maple-and-mathematica-in-examples-picked-by-ma)

I am reading the document How Maple Compares to Mathematica. On page 15 there is an example where Mathematica produces wrong results. Does anybody know why?

MAPLE:

MATHEMATICA:

Also on page 17 ...

- asked by mrz (31 votes), answered by Mr.Wizard (37 votes)

[How to express trigonometric equation in terms of of given trigonometric function?] (http://mathematica.stackexchange.com/questions/434/how-to-express-trigonometric-equation-in-terms-of-of-given-trigonometric-functio)

How can I express a trigonometric equation / identity in terms of a given trigonometric function?

using following trigonometric identities

- asked by Prashant Bhate (23 votes), answered by Simon (27 votes)

[Creating a certain image (3D shadows, highlighted intersections)] (http://mathematica.stackexchange.com/questions/92494/creating-a-certain-image-3d-shadows-highlighted-intersections)

I would like to learn how to code within Mathematica the following picture:

I tried using

planarShadow[x_, direction_, normal_, darkShadow_: True] :=

Module[{d, n}, d = Normalize[direction];

...

Module[{d, n}, d = Normalize[direction];

...

- asked by boldbrandywine (5 votes)