# All Questions

754 views

### How to examine the structure of Graphics objects

One difficulty I'm encountering in studying the structure of Graphics objects is that I have not yet found a way to print or display such structures that are ...
1k views

### Function to subdivide interval into n evenly-spaced points

[This post needs better tags than I could come up with. Edits to the tags would be particularly welcome.] I realize that it is trivial to define a function that takes an interval (i.e. two ...
249 views

### How to plot the contour of the radius part of a complex function

Suppose we have a complex function $f(x,y)$, in which x and y are real variables. In theory we can write the function into the polar form $$f(x,y)=r(x,y)e^{i\theta(xy)}$$ where $r(x,y)$ and ...
220 views

### Structure of Graphics (esp. those produced by Plot, ListPlot, etc.)

I'm looking for a description of the structure of Graphics objects, aimed at the advanced Mathematica programmer. The motivation for this question is the ...
239 views

### String to File removing quotation marks

If I print a string to a file it also adds quotation marks to the string. Here is an example: a = "test \t test" a >> file FilePrint["file"] How can I ...
174 views

### How to expand multiple cells at once?

Is there a simple way to expand multiple cells simultaneously? At the moment I am primarily interested in fully expanding "in one fell swoop" all the cells in a documentation window, although I can ...
606 views

### How to plot the Euler's formula in 3D?

In Von Neumann's stability analysis of Finite Difference Equations, the Euler's formula is used to describe a perturbation. Now the finite difference equation is stable if this perturbation does not ...
108 views

### How to explain the result of the two functins?

How to explain the result of the two functins? Input1: ...
423 views

### How to make a filled Ellipsoid?

I want to make a filled Ellipsoid, but it seems Filling options doesn't work in Graphics ...
2k views

### Sum all numbers from 1 to 1000 divided by either 2,3,5 or 7

How do I find the sum all numbers from 1 to 1000 divided by atleast one of 2,3,5 or 7? EDIT: I am sorry for complicating this, but I need it to work for 10^11. So anything that requires too much heap ...
124 views

...
946 views

### Obtain a stable solution using NDSolve

I am trying to solve a partial differential equation using NDSolve. When I am not specifying any method options with NDSolve, it ...
334 views

### Setting a Counter in Mathematica Notebook

I would like to write a book using Mathematica, but I will write one chapter on several files. How to tell Mathematica that the BookChapterNumber pointer has the ...
3k views

### How to plot periodic function's graphic?

How to plot periodic function's graphic? For example, $f(t) = t$ when $-5<t<5$ and $f(t+10) = f(t)$. ...
349 views

### How to interpret an image histogram and plot histogram3D for an image?

I'm really finding many ambiguities in how I really should interpret the histogram of an RGB image? I could understand what the height denotes, but did not understand how the pixels get plotted on a ...
86 views

### Insert glyphs into a string using functional code

I asked this question few days ago: Replace For-loop with functional code Suppose I use strings instead of lists; for example a = ToString /@ {123123, 112233};` ...
666 views

### How to write plain Greek in a text cell

If I create a text cell and type some greek text, most of the symbols are italics as if the cell had an Input style. It doesn't happen with latin characters. I recollect that it is impossible to fix ...
591 views

### ContourPlot shows only part of the contours [duplicate]

Consider these contour plots: f[x_,y_]:=Cos[x] + Cos[y] ContourPlot[f[x, y] == 0, {x, 0, 4 Pi}, {y, 0, 4 Pi}] ...
61 views

### can someone how to plot $x = c$ in a different color scheme? [duplicate]

Exactly as title says. I do not know why I am having so much trouble with this. I have googled many solutions and I cannot find a straightforward answer. Also, the only method I know is "Gridlines" ...
726 views

### What's the cleanest functional-programming style way to perform this list operation?

I am looking for the correct method for accomplishing the unknown piece in the following code snippet: rolls = Tuples[Range[1, 4], {2}] ...
363 views

### Long text inside a grid does not word wrap

If I create a simple grid with Ctrl+, and paste a long piece of text outside the boxes (I'm sure you can find some yourself), then that text does not break at the width of the window in Mathematica. ...
705 views

### Solving a diffusion equation

I need to solve a particular diffusion equation with NO boundaries (see eqn. (2.10) in: Ann. Rev. Astron. Astrophys. 19:137-62 (1981).) with nu = cost. ...
215 views

### Plotting data with 4 columns!

I'd like 3Dplot a list of data with 4 columns (these are mesh outputs): x1 y1 z1 Dose1 x2 y2 z2 Dose2 . . . which command i ...
69 views

### Combine 2D images perpendicular to each other [duplicate]

I would like to create a slice plot from multiple density plots in Mathematica. A solution for this probem has been posted in this forum before (Is there something like DensityPlot3D?). But how would ...
540 views

### Finding max value of each column of 4x4 Array

I have the following array in both MatrixForm and List form ...
447 views

### Problem in units convertion when multipliying Boltzmann constant and a temperature

When define the temperature of a variable in Celsius, Mathematica 9.0 does not calculate the right answer when multiplying by boltzmann constant. Example: ...
297 views

### Applying rules with functions to expressions with derivatives

I have a function that I want to see applied, potentially within a derivative. The use of delayed vs. non-delayed rules seems irrelevant. See the following: ...
131 views

### How to define a function of z[bar], etc

Using Displaying index as subscript on output: e.g. C[i] -> C_i with Notation[...] or Interpretation[..]? I have often ended up wanting to define functions of annotated variables to better match my ...
91 views

### Matrix generation

I have a $2x2$ matrix $M$. $M$ has the following form: M = {{a, bExp[-2ikz]}, {bExp[2ikz], a}} $a, b, k - const.$ z is ...
150 views

### Getting output in the same way as most Stat packages

I have been looking at several of the timeseries functions in mathematica, however running a process like ARDL, ARMA, GARCH or ARCH you would be able to get a ANOVA table, with its coefficients and p ...
376 views

### NDSolve and memory usage

After some googling, i've found similar problems around, but didn't find a 100% satisfactory answer, so let me ask here: I'd like to solve a 1+1 problem using the method of lines. In spherical ...
306 views

### How to declare a function that uses local variables of a module outside this module?

I have the following code Module[{f,x=0}, f[t_] := x + t; ..........; ...f[1]...; ..........; ] My aim is to put the declaration of the function ...
564 views

### Labelling of multiple BarChart elements with “Stacked” layout

I am trying to create a stacked BarChart where each BarChart has different ChartLabels. ...
191 views

### Verify Harmonic Addition Theorem with Mathematica

I've calculated the harmonic addition theorem and would just like to check my result with Mathematica. However, ...
205 views

### Taking a percentage of data from a list or a table

I have a list of data and for the calculation I only need the a of portion of the data. I know that Take[data, {1,100}], for example, is taking line 1 to 100 of the ...
211 views

### Parallelizing or optimizing a script for calculating the size of all pairwise intersections between collections of sets

I need to speed up or parallelize an operation that looks essentially like this: ...
380 views

### Quickly reducing the number of decimal digits for a set of real numbers

How can I quickly convert a number with $n$ decimal points to a number of with $m$ decimal points? Round works, however, it is slower than I would like. This ...
160 views

### Remove braces, {}, from around DynamicModule output?

Is there a way to remove the braces from the front end output associated with DynamicModule? For instance: ...
1k views

### Reconstruct text pages cut by shredder

Q1: I have a page of a printed text file, but it was cut by a paper shredder (from top to bottom). You can download all the paper fragments here. Here are some of them. How can I reconstruct it? ...
411 views

### Plotting the direction field of a differential equation

I have to sketch the direction field for the following differential equation: $$\frac{dy}{dx}=\frac{-0.02 y +0.00002 xy}{0.08 x-0.001xy}$$ This is the code I used, which gives an incorrect plot: ...
330 views

### How to manipulate log arguments?

A common problem I have with Mathematica is needing to manipulate the arguments of logarithms. Typically, I need to take ratios of the log arguments Mathematica gives me by default. That's to say ...
367 views

### Simplify vector expression - is there something like “Factor” for vectors, dot products etc.?

I am looking for a way to simplify dot products etc. Here is a minimal example: Lets say I have two vectors a and b: Array[a,2] Array[b,2] Now I evaluate their ...
663 views

### Integral of the Sinc product

Let as consider the following integral $$B_n = \int_0^\infty \prod_{k=1,3,5,\dots}^n\frac{\sin (x/k)}{x/k}dx$$ By definition, Sinc[x]=Sin[x]/x therefore ...
60 views

### Rounding to the nearest decimal [duplicate]

If I have a bunch of numbers in a list {1.435243523432,2434.2321321412,5.8239897,...}, without multiplying everything by some power of ten and then dividing by that ...
279 views

### Manipulate, Import external table, save as CDF, mail presentation

For my work I do data analysis. Most of these analysis are done on big databases with milions of records. I would like to make a manipulate (or animate) using a external dataset and create a CDF ...
204 views

### Make dynamic controls from existing list

I have a list of variables (c1,c2,c3,c4), each with its ...
473 views

### Implementation of the Polynomial Chinese Remainder Theorem

I would like an implementation of the Chinese Remainder Theorem for polynomials in $\mathbb{Z}[x]$, that is, a function ...
198 views

### Selecting terms from a matrix

There are similar questions to this on the forum but none fit the purpose here: I would like to extract certain elements of a matrix depending on whether a factor is present or not, and create ...
77 views

### When to use memoization concept in Mathematica? [duplicate]

I have recently learnt memoization concept. But I am not sure in what scenarios i need to use this concept. if someone can help me out with different scenarios it would help me a lot to develop a ...
865 views

### Mapping function onto two lists, simultaneously [duplicate]

I have this function ...

15 30 50 per page