# All Questions

71 views

### Series and that old ivar error

I am trying to compare plots of the function (1+x)^{1/3} and its power series. The code for the power series generates an error message referring to an invalid variable: 'General::ivar: -1.09993 is ...
97 views

### Sharpening extrema using DensityPlot

I have a data set where I really care mainly about visualizing the highest and lowest areas. DensityPlot suits my needs well, but ideally the maxima and minima would pop more from the rest of the ...
985 views

### Runge-Kutta 2nd Order ODE Solver

Suppose I have a 2nd order ODE of the form y''(t) = 1/y with y(0) = 0 and y'(0) = 10, and ...
169 views

### How to minimize the sum of squares of deviations from the mean?

I am trying to minimize the sum of squares of a deviation from the mean applying the following: Minimize[Sum[(Subscript[x, i] - \[Mu])^2, {i, 0, n}], x] It ...
111 views

### Animating arrows

I have the following Code: ...
215 views

### Procedural to functional style

The following code generates an iterative mapping of some trigonometric functions. I have a couple questions about it. The first question is how to optimize this iterative process using mathematica's ...
108 views

### Documentation build failed with Workbench

I'm starting to use Wolfram Workbench 2 to develop a Mathematica package. For the first time I tried "Documentation - Build" under the "Application Tools" but got fatal errors: BUILD FAILED ...
205 views

### saving outputs of loop

I am stuck on a problem. I have outputs generated at every iteration of a do loop. However, I want to save the outputs in some other file format, like text file etc, in such a way that i must be able ...
109 views

### Audio sample data from a Sound object

When generating a Sound object by using Sound primitives, like: Needs["Audio`"] sound = Sound[ListWaveform[{{1, 1}, {1.496, .7}, {2.501, .3}}, 265, 1]]; how can ...
86 views

### Alternative to Except in StringExpression when using StringMatchQ

According to this answer and the documentation for StringExpression, Except can only be used in StringExpression for classes of ...
119 views

### Matrix/tensor addition behaving funny under replacement?

I have two matrices I want to add, and one of the matrices is a tensor product of two vectors. I've used a SetDelayed to define the summed matrix, because I want to evaluate it for different values of ...
140 views

### how to apply a function to a list of tables

I have several files, and I want to extract for each of them a table, and then select just numbers, and keep only rows with five elements. My code works fine during import ...
103 views

### select from a list based on digits

I wish to know how do I count the number of occurrences of numbers that end in digits d. e.g. Say I create a list of Divisors of 12! I now want to count those divisors that end in 12. Like 12 & ...
147 views

### Improving code for comparing and modifying nested matrices

I have a matrix such as: ...
77 views

### Pattern matching to head with HoldFirst

I want to define a function that only operates on expressions with a head from a given list, such as f[expr:(_And|_Or)] := Print["LHS is ", expr[[1]]]; This of ...
124 views

### How do I perform the riffle function backward? [duplicate]

I know riffle will combine the lists {1,2,3} and {a,b,c} to be {1,a,2,b,3,c}. Is there a way to work backward and split the list {a,b,c,d,e,f} to be {a,c,e} and {b,d,f}?
128 views

### Output for $\LaTeX$

I have a Mathematica command WriteString[str,TeXForm[ToString[a]^ToString[Divide[p, q]]]] where a=47, ...
105 views

### Is there a way to make the MemberQ function apply to a list?

Is there any way to ask a boolean question if the elements of the list {2,5} are in the list {1,2,3,4,5}?
155 views

### Why Doesn't Mathematica Simplify Combinations of Quotients? (Integer Division)

I stumbled across this as part of a more complicated formula but it can be shown very simply: ...
140 views

### How to define a new stochastic process which is function of another process?

I need to define a new process from for example Wiener process like $U(t)=f(W(t))$, (for example $f(x)=1+x^2$ ) and then calculate the average like $\langle U(t)U(s)\rangle$. Is it possible?
51 views

### Importing a Matrix whit different column numbers depending on the row

I have a bunch of coordinates given in a file. The file contains Startpoints and Endpoints of arrows in columns(Example): ...
3k views

### How to force 2+2=5

I was looking at this question (writing a program such that 2 + 2 = 5) and tried to write something in Mathematica, but I couldn't get something to work without completely replacing ...
130 views

### Reverse-order Negative BarSpacing

Suppose I have some data for a bar chart: ...
298 views

### Find polynomial equation for set of 3D data

data was given in columns in the order {y, x, z}, with y dependent on x, z ...
110 views

### why I can not find the correct derivative with D

the coupled ODE is ...
379 views

### Aligning two lists

I have two lists, L1 and L2, each with a key and some data. Let us say the key is a person's name, a string, and the data follows. (To respond to rasher's query:) Let us also assume the lists are ...
83 views

### Help function ? sometimes doesn't show help

I was just wondering if this is a known bug. When I want to get basic help using the ? command before some function name, it typically works for a while, but I've ...
67 views

### Graph label smushed in when printing

I was playing around with the printing options because at first my notebook's printout was strangely way too large. However, after apparently solving the problem, now I noticed that when I print out ...
45 views

### Placement of pattern matching rules in functions [duplicate]

Is there any difference at all between f[x_Integer /; x >= 0] := x + 1; f[x_Integer] := x - 1; f[x_] := Null; and ...
71 views

### How to draw guide lines spanning between two panels or graphs?

I would like to draw the blue guide lines as shown spanning between the top and bottom graphs. Any help is appreciated. Thanks!
245 views

### find cycle in directed graph

Given a digraph G in the form of a list of edges, is there implemented some command that returns a directed cycle in G of ...
304 views

### position of element in a list using a function

How can I find in a list l the positions of all elements satisfying a boolean function f. For example, how can I pick in ...
167 views

### Partial zeta curlicues

I asked a question at MSE and Raymond Manzoni provided an excellent answer that included these visuals: I made a very basic attempt at recreation with ...
112 views

### How to remove a gap between the chart labels and the frame in a BoxWhiskersPlot

When making a nested BoxWhiskersPlot with chart labels, the labels are nicely spaced below the bottom frame when using labels for all nested data ...
227 views

### Plot slope field in Mathematica for a difficult differential equation

I am trying to plot slope field for $\ddot{a}(t)$ for this differential equation but I don't know how to $\frac{d}{dt}\ddot{a}(t)=2\frac{\dot{a}(t)}{a(t)}\ddot{a}(t)$ I want to show that already ...
176 views

### Finding the roots of a function with a parameter

I am using a differential equation method for finding the roots of a function. My function is much more complicated but I can illustrate my problem with a trivial example. The problem occurs when ...
216 views

### Placing many arrowheads on curves

I can't find anything anywhere on the web to help me with this. My plot: ...
51 views

### Will custom fonts in my notebook be carried over?

In my notebook, I have Open Sans (a free font) as a text font and Consolas (a paid font) as a code font. Those fonts are coded into the stylesheet of my notebook. My question is: if I send someone a ...
2k views

### Creating a 3D List Line Plot From Discrete Points

Given the following Runge-Kutta ODE solver and the graphical output below, how do I get a 3D line plot instead of a 3D point plot? I see that there is no ListLinePlot3D function, so I thought it might ...
143 views

### Use only exponents (no radicals) in output expressions

Radical symbols ($\sqrt{\,\,\,\,}$) are the devil. Is there any way to get mathematica to never use them, and instead express everything as an exponential? i.e. I want ...
66 views

### How to include automatic references to cells styled with DisplayFormulaNumbered

Under the Style menu, there is an entry called DisplayFormulaNumbered. It does exactly what it seems to suggest: it indexes the ...
187 views

### Syntax highlighting conflict

I'm trying to syntax highlight this expression: x=$\sqrt{\pi }$//N and from various sources I've learned that x (the assigned symbol) belongs to context Global while the Pi and N belongs to System. So ...
112 views

### Remove singularity at zero from $-((i^{-n} (-1 + i^n)^2)/(n^2 π^2))$

The expression h[n_] = -((I^-n (-1 + I^n)^2)/(n^2 π^2)) is real for all integers n. Although indeterminate at ...
365 views

### Why does Equal[“string”, False] not evaluate to False?

Why does Equal["string", False] not evaluate to False? I would have thought Mathematica could prove that these two things are ...
340 views

### How can I construct a distance table?

I have a list of city names (of arbitrary length), f.e. c = {"BAL", "NYC", "LAS", "AUS"}; and the distances between them : ...
98 views

### Invisible characters being inserted into the output from FindMaximum

I have been using Mathematica for quite some time but I have never seen anything like this. It started without warning and I am not sure how to fix this. Please have a look at the following example ...
98 views

### Why do two roots of my equation disappear when I give numerical values to two parameters?

Consider the equation ...
198 views

### How to modify font for all text fields?

I know that one can modify the StandardForm style so that all input and output codes (and maybe other things too) follow that style. This makes it tricky to make input code different from output code ...
I have a very large network of atoms ($\approx 10^6$ atoms) with fixed positions that resemble a cellular structure: I have two files including: fixed locations of each atom set of points which ...