10
votes
9answers
2k views

How can I make a Tribonacci sequence in the form of a list?

How can I make a Tribonacci sequence that is in listing form? it suppose to look like the Fibonacci sequence but I couldn't get ...
10
votes
2answers
252 views

Backslash commands in strings?

I discovered by playing around that Text[DisplayForm@SubscriptBox["\[Lambda]", "k"]] produces the same result as ...
10
votes
2answers
537 views

How to take derivative of parameterized coordinate?

Suppose I have a vector in $\mathbb{R}^n$ but $n$ is not known in advance. I want to be able to write functions which operate on the components of that vector, and then I'd like to be able to take ...
10
votes
1answer
2k views

Output from Wolfram language in Python

I have a Python program which will run a script in the Wolfram language and then return to the main program. Is it possible to return values/variables to the main program? This is the code in Python ...
10
votes
3answers
19k views

MathLink linking error after OS X 10.9 (Mavericks) upgrade

After macosx 10.9 mavericks upgrade i have a compilation problem, you can see below. Even the examples given in ...
10
votes
4answers
2k views

Drawing minor gridlines

What's the best (most elegant, shortest, easiest to read) way to add minor grid lines to a plot? Here is an example: ...
10
votes
2answers
338 views

How to find a specific error message?

Is there a way to find an existing error message in the System` context, that is used for a certain case? I want to include a message in a custom function that ...
10
votes
1answer
186 views

Is there a way to base one style on another?

I'm setting up a stylesheet and and finding the process of defining related styles tedious and error prone. In particular, I have several related styles that need to have synchronized settings (e.g., ...
10
votes
2answers
2k views

Overlapping accurately Images and Graphics (without loss of resolution)

Context In a previous post, I learned how to produce these kind of plots, which are of interest in astrophysics and geophysics. I am now interested in combining them. Attempt For this purpose, ...
10
votes
1answer
432 views

How can I use “Save as (html)” and still render code as text?

I use notebook "Save as ... (html)" to convert my .nb to web. Formulas and plots get converted to images, which is fine. But code (input cells) get converted too into images. I would like people to be ...
10
votes
2answers
292 views

Strange results while nesting scope constructs?

I did a handful of tests with Block, With, and Module and had a couple of new surprises. ...
10
votes
1answer
2k views

Construct 3D image from multiple 2D images

My goal: How to (1) construct 3D image for visualization. (2) how to write 3D array or image into binary raw file. Is there a way to accomplish this in Mathematica? Alternative_Answer for: ...
9
votes
1answer
216 views

How to discretize a BezierCurve?

Bug introduced in version 10.0 and persisting through 10.4 DiscretizeGraphics is new in 10.0. I need to create a discretized region from a ...
9
votes
4answers
471 views

Difference between Sort and SortBy

I was playing with Sort. All examples I have come across so far, i.e Sort[{1, -1, 3, -3, 2, 5}, Abs[#1]<Abs[#2]&] can expressed in a shorter fashion ...
9
votes
2answers
204 views

Inconsistent behavior of undocumented Encode->Import->StringToStream->Get on password-locked stream

Let's save a definition. Encode it with password/key and Get it again. We will not use Get ...
9
votes
1answer
1k views

FEM - how should I impose periodic boundary conditions in pure space problems?

I have searched other threads, but I was not successful in finding an answer I could understand. Right to the point: how do I impose correctly periodic behavior on the edges of the rectangular ...
9
votes
1answer
147 views

Installing LinkSnooper on Windows

I tried to install LinkSnooper on my Windows 7 computer, as described in the documentation and here. According to the answer of @Todd Gayley, I entered the following string in the field MLOpen: ...
9
votes
2answers
213 views

Export[] performance

Consider this sequence of commands: ...
9
votes
0answers
299 views

Dataset: cannot reproduce a basic example. A bug? [duplicate]

Just to report: I try to reproduce the very first example for the Dataset from the Documentation Center: ...
9
votes
2answers
724 views

plotting a trig functions along with its envelope

Note: This questions is quite different from the ones referred to in the comments. Those deal with numerical questions, while this one is algebraic. I have plots of the following type: ...
9
votes
2answers
320 views

How to see which arguments are passed into a function

It is often that one wonders which arguments are evaluated before being passed into a function. I would like to know if it is possible to see which argumets are being passed into a function without ...
9
votes
7answers
2k views

How to select all elements above the main diagonal of matrix?

How to select all elements above the main diagonal of matrix? I need to create a list of them.
9
votes
2answers
361 views

Problem with PlayerPro recognizing a proprietary package

This question follows on from my earlier question Can Wolfram's Player Pro Use Proprietary Packages. That question appeared to have established that, yes, PlayerPro can use proprietary packages. ...
9
votes
2answers
203 views

CompiledFunction crashes kernel

Bug fixed in 10.0.0 This crashes my kernel ...
9
votes
4answers
671 views

Color change of area under a curve

I am trying to set a graph to show the value of the equity of an investment based on whether the portfolio is invested or in cash. I tried using the ColorFunction, ...
9
votes
1answer
197 views

How can I make CurrentValue for font characteristics pick up the font of the output not the input cell?

The command CurrentValue (documentation) allows you to access various properties of fonts, such as x-height, line height, and various measures of width such as ...
8
votes
1answer
951 views

How to Speak in a foreign language?

A previous question changed the pronunciation by changing the spelling of words or by externally changing the default system voice. This is useful for speaking in foreign languages too, but I don't ...
8
votes
1answer
251 views

Plot that draws a dashed/solid curve depending on the y-value of the curve

Kind of as an extension of this question: How to plot a series using different colors depending on the y-value Is there something similar to MeshFunction or ...
8
votes
5answers
2k views

How to check if a line segment intersects with a polygon?

The naive method is to bisect the line segment iteratively as asked here, and then check the bisection points using How to check if a 2D point is in a polygon?. Would there be an other way? I'm ...
8
votes
2answers
185 views

Missing: KeyGroupBy?

Especially in tree-structured data, keys and values, being two sides of the same coin, frequently interchange roles. The ability to aggregate by value but not by key upsets the balance. How to ...
8
votes
3answers
708 views

How to draw timing diagram from a list of values?

What is the most elegant way to draw a timing diagram specified by a list of zeros and ones? In the following code I attempt to draw the clock pulse diagram, and I'd like to continue drawing the ...
8
votes
5answers
935 views

Drawing a cuboid with rounded corners

I want to draw a cuboid with rounded corners, like this: RoundingRadius only works with Rectangle or ...
8
votes
2answers
729 views

Nonrectangular region for NDSolve

I have a PDE with mixed boundaries (Neumann and Dirichlet on some sides) in the region $(t,x,y) \in \left( 0, T\right) \times\left\{ -L \leq x \leq L, 0 \leq y \leq h(x) \right\}$ where $h(x)$ is ...
8
votes
1answer
604 views

Counting elements which are inside another element on a different colour channel

I have a 3-channel image which shows red and green points (certain labelled proteins) inside blue regions (cell nuclei). After applying some segmentation filters, the resulting image is as follows: ...
8
votes
3answers
1k views

Plotting a 2D shape along a 3D parametric function curve

Say I have a 3D curve that is parametrically defined. How would I be able to plot shapes like figure 8's whose centers are aligned along the 3D curve? Say the curve was: ...
8
votes
1answer
794 views

What does ` symbol in ClearAll[“Global`*”] mean?

I have found an example for clearing all symbol definition by: ClearAll["Global`*"] But what does the symbol ` mean? It isn't the apostrophe ', yet it is not ...
8
votes
1answer
2k views

Quality control when exporting graphics into JPG

If I export a graphics from Mathematica to JPG format the image quality in JPG is visibly lower than that in Mathematica. Is it possible to control and eventually increase the quality of the exported ...
8
votes
5answers
2k views

How to enter textual subscripts and superscripts?

When I add a sub- or superscript to a letter in a "Text" cell using the "Writing Assistant" palette this letter becomes Italic: ...
8
votes
1answer
1k views

How to avoid font substitution with Mathematica fonts?

When I export a Plot to PDF, a journal publisher complains that they do not have the Mathematica fonts. I believe there is a way ...
8
votes
4answers
842 views

How can I highlight the points lying between two lines in a ListPlot?

I have a list of numbers like the following: list = Table[RandomInteger[1000], {i, 1000}]; And I plot them so: ...
8
votes
2answers
892 views

a problem about simplifing conjugate

the situation is as follows ...
8
votes
2answers
378 views

find subsequences of constant increase

A list like l = {0, 1, 2, 3, 4, 5, 7, 9, 12, 13, 18, 19} may have subsequences of constant increase, $a_{n+1} = a_n + k$. For example: ...
8
votes
1answer
697 views

Using Partition to allow sublists of different lengths

As a minimal example, suppose I have a list of the integers from 1 to 25. Suppose I want to use Partition to partition the list into sublists of length 10 but ...
8
votes
1answer
289 views

LocatorPane, selecting multiple Locators

Consider the following snippet ...
7
votes
1answer
639 views

Calculation of 2D FFT for an image

I am trying to obtain 2D FFT of an image. From the 2D FFT, I wish to calculate the amplitude of the FFT averaged over a circle vs the distance in pixels by varying the radius of the pixels which is ...
7
votes
4answers
220 views

Create Nested List from tabular data

Im trying to create a nested list from tabular data, then onward into a nested association. I can get part way with the help of this answer but it only works for the first level. Repeated use of this ...
7
votes
3answers
165 views

Unknown function with arbitrary arguments assumption

Is it possible to define an assumption like this: $Assumptions=f[__]>0 So that: ...
7
votes
3answers
666 views

Normal // Association // Dataset workaround for some user query operators

Given example tabular data (ie, with rows and columns, or "data frames") ...
7
votes
2answers
230 views

How to correct this, `f[a_] := FindRoot[eq == 0, {x, 0.5}]`, where `eq` contains a parameter $a$, without using `eq[a]`?

I want to solve an equation with a parameter $a$, and define the result as a function of $a$. It is something like this: ...
7
votes
1answer
2k views

How to set the working precision globally? $MinPrecision does not work

I want to increase the precision globally to 50 at least, but $MinPrecision does not work. ...

15 30 50 per page