# All Questions

62 views

### Print without linefeed [duplicate]

Is it possible to print with a carriage return but not a new line? I'd like to keep track of the progress of a long calculation without filling the screen with prints.
132 views

### Converting unevaluated lists to strings

I have a list like l = {2 - 3, 12 - 4, Times, aab} I want to end up with {"2-3", "12-4", "Times", "aab"} I have tried ...
150 views

### Strange behavior of BinCounts

Bug introduced in 8.0 and fixed in 10.0.0 Just try this example: ...
886 views

### Solve within a range?

Is it possible to solve an equation in which some some of the parameters have defined ranges? Example: ...
352 views

### Discrete peaks to curve via Voigt summation

I have two data sets. One is an experimental recording of an absorption spectrum, composed of regularly spaced (wavenumber, intensity) coordinates with a fine wavenumber resolution, thus making ...
112 views

### Custom ticks in distribution chart [duplicate]

I am trying to just get simple logarithmic ticks to the distribution chart, and failing... It is unhappy with any FrameTicks format I try (sparing ...
333 views

### Make Plot look like Bloomberg terminal

I've always wanted to make my financial Plots look like a Bloomberg terminal. How would I go about making my chart look like one? I am talking specifically about ...
163 views

### Building adjacency matrix from set data

I have two sets: games and players. Players pick their games. As such I will have data say g1={p1,p3,p5},g2={p2,p4},g3={p2,p3,p5}. My interest though is to build the connections among players because ...
41 views

### Fitting for multiple data in Mathematica [duplicate]

I've just started to use Mathematica for programming and I was wondering how I could do Fitting for several data sets. For example, I have one curve. For this curve I need to plot a fit curve, if my ...
232 views

### Using a web-crawler to search website for occurrences of keywords

Given this list of cities: ...
753 views

### 2D Visualization of links and knots

I am trying to draw a picture using Mathematica of three loops linking together in 3D as follows. ...
409 views

### What's the difference between variables with and without a subscript?

If I input $x = a + b$, the $x$, $a$ and $b$ are blue. When I hit Shif+Enter, the $x$ turns black, indicating the kernel now knows this variable. But when I input $x_r = a + b$, and hit Shift+Enter, ...
162 views

### Plotting and ContourPlot

Make a Plot and a ContourPlot that gives the same diagram and use ContourPlot on a ...
79 views

### how to mean of day,month value

data={{{2006, 1, 1, 0, 0, 0.}, 326.492, {2006, 1, 1, 3, 0, 0.}, 323.08, {2006, 1, 1, 6, 0, 0.}, 314.223, {2006, 1, 1, 9, 0, 0.}, 314.361, {2006, 1, 1, 12, 0, 0.}, 322.048, {2006, 1, 1, 15, 0, ...
784 views

### Undocumented use of Integrate: Integrating over regions

I have come across a few questions asking about integrating over regions. And while the answers are impressive there should be a better more consistent way. So my question is, are there ways, ...
183 views

### Selectively converting numerical strings to expressions

I have a list of strings representing different types of data ...
129 views

### Is it possible to get a VertexColors effect in cylinder?

I'm trying to create a figure illustrating a cylinder filled with gas. And I saw a very good looking similar one at here. The shape is polygon and by using the VertexColors option, it creates a ...
115 views

### Randomly generated polymer with certain spatial density

For simplicity's sake, let the polymer's composing particle be integer 3-tuples (on 3D Cartesian grid), such that: Polymer-ness -- for all particle there is an directly adjacent neighbor. i.e in ...
55 views

### Grouping Nested Lists Based on Differing Values of Single Element

I've a list of lists representing k-rows of truth table having n elements each in a nested list consider ...
490 views

### Projection of curve 3D (x,y,z) on the x-y plane

I have a following systeme : \left\{ \begin{array}{rcr} (\beta+\frac{1}{2}\delta^{2})\nu_{1}(u)-\delta\nu_{2}(u)+\nu_{3}(u)& = &0\\ ...
39 views

### can I evaluate multiple cells at the same time? [duplicate]

my laptop has 2 cores, can I assign a core to evaluate one code, and the other core for another code in parallel instead of evaluating in sequence? thanks
107 views

### Defining arbitrary order derivatives function [duplicate]

I have a function $\phi(t)$ and I want to define a function $\phi D(t,r):=\phi^{(r)}(t)$, in other words evaluate the $r$'th derivative of $\phi$ at $t$. The naive code that I have is: ...
262 views

### How to draw hypercube graphs

I'd like to draw hypercube projections like those on the Wikipedia page: I tried with HypercubeGraph[6] but the graph does not look right; it is not ...
135 views

### Mathematica won't maximize my function

I'm trying to maximize two functions. For the first one, the code runs correctly and returns the desired answer ...
149 views

### Implementing Kane's Subset Sum Algorithm

In the following paper, D. Kane describes an algorithm for subset sum that runs in logspace: http://arxiv.org/pdf/1012.1336v2.pdf. I am trying to implement it ...
356 views

### How to do memoization together with evaluation of a complicated function

UPDATE 2: much shorter version Given a list of paired indices {i, j}={{1,2}, {3,4}, …}, I need to first evaluate a rather complicated function test[i,j,x] (because ...
228 views

### Change size of a saved plot or image (post-processing)

I have many plots (that take a long time to run) and each is saved to a variable name. For simplicity, say one was: ...
51 views

### What's wrong with my rule? [duplicate]

Consider a simple code to form a SparseArray: Q = 5; a = Table[i, {i, Q}]; SparseArray[{{j_} /; j > 2 -> a[[j]]}, {Q}] Part::pspec: Part specification j ...
55 views

### Unexpected behavior of subtraction with approximate numbers [duplicate]

I'm using the Table command to generate a list of values: FullForm /@ Table[10. - x, {x, 2.7, 2.8, .1}] and I get the ...
90 views

### Sort lists of vertices {indegrees, outdegrees} by indegree

in = VertexInDegree[F]; out = VertexOutDegree[F]; I want both in and out to be ordered by in. Example: graph has nodes a,b,c with indegrees 1,2,0 and outdegrees ...
1k views

### Bug in mathematica analytic integration?

I found Mathematica provides me a wrong answer for a relatively simple analytically solvable integral: ...
652 views

### Make a scatter plot from two columns of matrix

I have imported my text-type data as a matrix. I want to make a scatter plot (ListPlot) using one column as x-axis and other columns as y-axis. Is there a ...
99 views

### How to optimize my code?

I use Mathematica to handle data.My trial as below: Interpolation function： ...
179 views

### Loop in solving multiple matrix calculation

I am wondering is there a way to use loop, like Do, For, to rewrite the last line in the code. I tried to use ...
94 views

### RSolve works slow and does not give an analytical solution for solving high order linear difference equations

RSolve@@{{a[n]-a[n-10]==101}~Join~Table[a[i+1]==101+10i,{i,0,9}],a[n],n} I want to get the exact form of general formulas, but ...
281 views

### Why do Tooltips slow down Dynamic so much? Is there a faster alternative?

I'm working on a Dynamic ListPlot with a few thousand plots, and it seems that wrapping the points with Tooltip slows the Dynamic responsiveness substantially. With the simple example below, dragging ...
956 views

### Rebuild a polygon so it doesn't self intersect [duplicate]

If you consider the following Polygon: ...
84 views

### Plotting a parametric graph and a normal one on the same grid with a legend option

Here is my simple code: ...
113 views

...
130 views

### Trouble plotting a function constructed using NIntegrate and FindRoot

Here is my code: ...
112 views

### Finding intersection and graphing

1) How do I find the intersection of f[c_] := y^2 - 2 x^2 (x + 3) == c ((y + 1)^2 (y + 9) - x^2) between the plots of f[0] and f[2] I tried plugging-in numbers. ...
812 views

### How to make a pie chart using custom image

Can we make a pie chart using a custom picture? For example, consider this image of one cent coin: I would like to use this image and cut pieces out, depending on data, and also make a clickable ...
222 views

### Symmetric function of the roots of a polynomial

First, I'm a beginner. I can compute the sum of roots with the follwing: Roots[x^7 + 5 x^6 + x^5 + x + 1 == 0, x] Plus @@ (x /. {ToRules[%]}) // Simplify Of ...
54 views

### Copy big or small values to $\LaTeX$

When I create a DistributionFitTest of a distribution I receive very low P values, e.g. $2.456750213008007 \times 10^{-367}$. When I copy this (by right clicking and copy to $\LaTeX$), and insert it ...
33 views

### How to output local variables when error message is generated without interrupting evaluation?

I am running a calculation to generate a dataset. I use several iterations to sweep over a parameter space. A few times an error message is generated (which is not the problem per se). Is it possible ...
896 views

### NotePad++ User defined language

I know there is a xml file with language for Mathematica notebook (nb or m files). The link is http://sourceforge.net/apps/mediawiki/notepad-plus/?title=User_Defined_Language_Files Now I want a xml ...
66 views

### Optimizing repeated function calls

Easiest way to keep my library nice, is to naively call some functions many times with same parameters. Doing so prevents from zoo of (library-)global variables and complicated initialisation ...
54 views

### Replicability of RandomVariate within a function?

I have a rather basic question but can't figure out a foolproof answer. In the following code, I build a function which returns the mean difference between successive elements of a vector created from ...