# All Questions

985 views

### Why plot returns empty in this example?

Let me rewrite this question, showing the original problem, as it is more subtle than the simple example I showed before using Sin[t]. Here we go again. When I ...
868 views

### CustomTicks and small ranges

UPDATE While the self-posted answer below (TickLabelStyle->TraditionalForm) works for most things, it also has the following effect: Integers are given periods ...
210 views

### Operate on several lists to create one list

How do you put corresponding values from different lists together according to some operation? E.g. I have three lists giving the velocity in the x, y and z direction respectively. I'd like create ...
279 views

### Truncate TreeForm to show only the top

For some expressions, TreeForm may grow very long. I'm only interested in the top levels of the expression. How can I get the tree form of only the first levels an ...
527 views

### How to solve this iteration in the functional programming way?

I am trying to come up with a functional programming method to calculate a list of replacements, that depend on previous replacements. Since there is always a finite number of steps, I would like to ...
325 views

### How to eliminate the need to double evaluate a Manipulate so that a Module in its Initialization section works?

Using V 8.04 on windows. I think this issue might be related to the fact that Mathematica reads main body the Manipulate before evaluating or running the Initialization option. Or, might be ...
39 views

### Launch Front End from .NET MathKernel and return result to .NET

Is it possible to launch a front end and open a notebook from a .NETLink kernel and return a result from the notebook to .NET? In the code below "x" appears in the .NET textbox after 10 seconds but ...
377 views

### Random sampling of multiple integers with constant sum

I want to build a model of 40 geological layers, assuming each layer has equal chance to be one of the four types of rocks and the four types of rocks have equal chance to appear in any layer. The ...
174 views

### Limit of partial sums involving inverse squares

Consider the finite sum rs[x_, n_] := x/n Sum[n^2/(i + (n - i) x)^2, {i, 1, n}] Is there a way to bring Mathematica to calculate the limit for ...
115 views

### RegionPlot, RegionPlot3D and differing embedding dimensions

RegionPlot seems to be for plotting regions with an embedding dimensions of 2 only, and RegionPlot3D for regions with an ...
245 views

### Find a Fourier series from discrete data

I am trying to fit a Fourier cosine series to discrete data. I read through this, but I was not able to understand it. The data should be periodic with a period of $0.2 \text{ m}$, and it is the ...
537 views

### How to create a thick spiral then extract the coordinates from the image?

___________________ FOLLOWUP TO THE QUESTION : _____________________ Does anyone know how I could quantify the thickness of the spiral AND the thickness of the empty space between the arms? I know ...
144 views

### How to check the option value?

Given that I have a function func as follow: To check the value of options, I using the step-by-step method If[] ...
66 views

116 views

### How to monitor the progress of exporting of animated GIF?

My Export is taking a very long time, I was hoping there might be a way to monitor the progress when exporting graphics? ...
203 views

### How much time should one give Mathematica for an integral evaluation?

Sometimes when I do integrals in Mathematica (M), it keeps thinking and thinking and I have no idea what is going on inside M. For how long should one wait or how does one know whether M has not got ...
94 views

### Deploy API which calculates matrix operations

Is it possible to deploy to cloud a matrix entry form and when submit button would be clicked and then an operation using entered matrix as argument would be executed? So far I am able to deploy ...
146 views

### Reap, Sow with Parallelize: bad performance, why?

I have a question about the performance of Reap and Sow with Parallelize. I am aware of the following questions How to collect result continuously (interruptible calculation) when running parallel ...
150 views

### Intersection of a ListPlot3D surface with a plane

I'm trying to use Mathematica to analyze some physics data from an experiment, more precisely, I have to fit a 2D data series with a one dimension function. At the moment I'm able to load and plot ...
60 views

### DateObject for current date skips a day when crossing the date line with TimeZone

The DateObject was introduced in version 10 of Mathematica. One can call it to fetch the current local date and time: ...
280 views

I'm attempting to MapThread a function of two lists that requires the index of the list values. For example, MapThread[#1*i+#2*j&,{{a,b,c},{e,f,g}}] Where #1 ...
169 views

### How to send OUT output to stdout when running a script from command line on widows?

I am learning how to run a Mathematica m file from command line. I am on windows. My question is: How to make the output display on the screen (the DOS windows) as the script is running? Currently, ...
205 views

### Sort two lists at the same time, based on another

I am new to using Mathematica and I can not find a solution to what I am wanting to do. I want to take a list such as: x = {1,2,3,4,5,6,7,8} and a second list ...
204 views

### Extra spaces when exporting strings into pdf (bug, linux)

Rationale: Imagine you would like to create a publication quality figure in Mathematica, from under Linux. Naturally, it will contain text/labels. Problem: Here is a simple string ...
233 views

### Is there any strategy to have a compiled version of FindFit or NonlinearModelFit?

Disclaimer: This is not a precise question with a definite answer. I know that neither FindFit nor NonlinearModelFit is in the ...
162 views

### Manipulate: Play the animation only once and stop

I do small animations with Manipulate, but sometimes I don't like that it runs over and over again from start. I would like to have the possibility to stop the ...
87 views

### What is now the preferred way to execute a notebook on startup?

This question was previously answered in part in earlier post through the use of the command AutoOpenNotebooks. However, as of 10.0 this command is scheduled for potential change or deprecation and ...
192 views

### multiple or variable x scales in [list]plot

I need to make a plot (in this case a ListPlot) in which the x (horizontal) scale varies: either piecewise linear or a single nonconstant function. The purpose is to plot data for graphs like this ...
220 views

### Extracting ragged array from an image

I have a list of points, which represent positions of peaks in an image. The nature of the image itself shouldn't matter, as I already have the peak positions. As a simple example, consider the ...
349 views

### Adjusting size and positioning of math notation in a Mathematica notebook? [duplicate]

Writing mathematics in a notebook is OK, but consider the following image: In LaTeX, I can write: $$y^2=\frac{1+2\sin^{-1}x}{2}$$ which displays as: ...
330 views

### Plotting jump function without vertical lines

Consider this list plot: ListPlot[{{0, 0}, {1, 2}, {3, 4}, {4, 2}, {6, 0}}] I want to draw a jump function in this list plot such that for each point I get a ...
88 views

### Removing spurious parenthesis in TraditionalForm

I don't understand the following behavior (in v 9.0.1) of TraditionalForm regarding insertion of parenthesis. Let us start with the a definition for ...
329 views

### Not able to get a solution to a Lagrange Multiplier Equation

I assigned several constrained optimization problems to my calc IV students to solve with Mathematica, but this one is being stubborn. The function to optimize is: f(x,y,z) = y Exp[x-z] with the ...
614 views

### Suppress extrapolation of interpolating function in a ContourPlot

I have defined an interpolating function, myfcn[x], valid on the domain x = 0 to 1.5. I am then using ...
96 views

### Error messages from TensorContract and TensorReduce

I am struggling with a few errors when using symbolic tensors. I am using mathematica 9.0.1.0, linux x86. The following code generates what seems to me an incorrect tensor, this is the smallest ...
267 views

### Enumerating all connected graphs with 9 vertices

The version of my Mathematica is 10. I generate a connected graph with 9 vertices, but find that it is not included in Mathematica. ...
228 views

### How can I plot the frequency of list items?

How can I plot the frequency of list items such as?: ...
212 views

### How to define even permutations correctly?

I define even permutations as following, but there may be some error. I use it in two different way and get different output. ...
222 views

### Solution to a T+U = E equation

I needed to solve really easy differential equation (in dimensionless units):  \mathcal{T} (\dot{\xi}) + \mathcal{U} (\xi) = \text{const.} \equiv \varepsilon ; \quad T(\dot{\xi}) = \dot{\xi}^2 ; ...
259 views

### How to use MKL from Mathematica?

MKL has a lot of functions. The question is: how to use these functions directly from Mathematica? Furthermore, Mathematica shipped with some MKL libraries, which is located in ...
258 views

### difficulty abstracting the OptionValue pattern

I am building lots of functions that use Options and OptionValue and wanted to reduce the redundancy in the expressions that ...
352 views

### Given f[1] … f[k], k = 1, 2, 3… how do one find the general function f[n]?

If I have that ...
506 views

### Detect each polygons in an image

Considering this image: Is there a way to colorize each tiles independently? My problem is that img = Import["http://i.imgur.com/Y87duSz.jpg"]; Colorize@img ...
3k views

### Exporting pictures in their correct size when using Grid [duplicate]

I have a large number of pictures, and I need to place each three of them in a grid with a certain layout. For example, if I have the following pictures: ...
158 views

### FullSimplify inconsistent

I'm having problems using FullSimplify to simplify a differential equation. The expression is simplifying just as I would like when I express a variable ...
585 views

### How can we create a histogram distribution from binning data?

HistogramDistribution takes a list of data points, creates a histogram from them, and returns this histogram in a form that can be used as a distribution. I ...
315 views

### Transform elements in list from form {x_} to form {x_, 0}

I have the following list ...
1k views

### Label Markers On ListPlot

I would like to make a scatter plot where each element corresponds to a certain energy. Each plot marker should have its corresponding element next to it. IE. The data point at -1.16187 should have ...