4
votes
2answers
144 views

Checking powers of a matrix for zeros

I'm currently working on a project that deals with numerical semigroups and their connection to matrices. I'm pretty new to Mathematica, so I wouldn't be surprised if my question has a simple ...
3
votes
2answers
134 views

Replacing Patterns In a List of Varying Length

I am working with an array of data that may look something like this. ...
2
votes
1answer
70 views

Sorting a matrix except its last row

Given M = {{"Utah", 2}, {"Iowa", 1}, {"Maine", 3}, {"Total", 6}} I want to obtain the reverse-sorted result like this: ...
0
votes
0answers
116 views

Can't Solve a system of differential equations, Solve takes too long

My question is probably not really interesting but I really need help on this because I won't have access to a more powerful computer. So my model contains 7 equations : ...
2
votes
1answer
95 views

ReplaceAll in an expression including large InterpolatingFunction

I have a large InterpolatingFunction that I'm transforming to another basis with a few simple multiplications and additions by (symbolic) constants. The ...
2
votes
1answer
98 views

Constructible numbers

Can Mathematica detect constructible numbers? I know it has MinimalPolynomial but for degrees higher than 4 it's not obvious whether a given polynomial yields a ...
1
vote
1answer
170 views

Requiring NumericQ in Pure Function

Potential duplicate, but doesn't seem to solve my problem: Using patterns in pure functions I have a function that returns an InterpolatingFunction, and it works ...
1
vote
2answers
133 views

function of derivative of a function

I know a similar question is answered somewhere, but it doesn't work for my case for some reason. I have the following problem in Mathematica. I want to compute f[h[x]]= x^2 + D[h[x],x]. Here, h[x] ...
2
votes
1answer
175 views

Why evaluation doesn't fail if arguments are invalid? [duplicate]

Sorry for a noob question, but this is something that I wonder about each time I work with Mathematica. Coming from standard programming languages (Python and Java), I expect my functions to fail ...
1
vote
1answer
177 views

Error loading shared library libML64i3.so

I'm trying to call Mathematica from C. I'm following the example http://mathematica.stackexchange.com/a/32864/14301 with ...
1
vote
1answer
196 views

Fitting Function with 3 parameters

I am trying to fit a function with 3 parameters however the result strongly depend on the initial values of parameters: ...
0
votes
1answer
74 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.
3
votes
2answers
188 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 ...
8
votes
1answer
154 views

Strange behavior of BinCounts

Bug introduced in 8.0 and fixed in 10.0.0 Just try this example: ...
1
vote
2answers
2k views

Solve within a range?

Is it possible to solve an equation in which some some of the parameters have defined ranges? Example: ...
0
votes
1answer
516 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 ...
1
vote
1answer
132 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 ...
4
votes
1answer
459 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 ...
2
votes
2answers
190 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 ...
0
votes
0answers
48 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 ...
2
votes
1answer
330 views

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

Given this list of cities: ...
18
votes
3answers
853 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. ...
3
votes
1answer
719 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, ...
2
votes
1answer
193 views

Plotting and ContourPlot

Make a Plot and a ContourPlot that gives the same diagram and use ContourPlot on a ...
-6
votes
1answer
92 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, ...
24
votes
1answer
1k 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, ...
4
votes
1answer
190 views

Selectively converting numerical strings to expressions

I have a list of strings representing different types of data ...
6
votes
2answers
145 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 ...
2
votes
1answer
134 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 ...
3
votes
1answer
64 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 ...
1
vote
2answers
712 views

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

I have a following systeme : \begin{equation} \left\{ \begin{array}{rcr} (\beta+\frac{1}{2}\delta^{2})\nu_{1}(u)-\delta\nu_{2}(u)+\nu_{3}(u)& = &0\\ ...
1
vote
0answers
41 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
0
votes
1answer
172 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: ...
7
votes
0answers
346 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 ...
0
votes
1answer
200 views

Mathematica won't maximize my function

I am trying to maximize two functions. For the first one, the code runs correctly and returns the desired answer: ...
2
votes
1answer
183 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 ...
4
votes
4answers
374 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 ...
0
votes
1answer
465 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: ...
0
votes
1answer
58 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 ...
0
votes
1answer
59 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 ...
1
vote
1answer
101 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 ...
28
votes
2answers
1k views

Bug in mathematica analytic integration?

I found Mathematica provides me a wrong answer for a relatively simple analytically solvable integral: ...
1
vote
5answers
1k 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 ...
2
votes
1answer
210 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 ...
0
votes
1answer
100 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 ...
8
votes
1answer
325 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 ...
15
votes
2answers
1k views

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

If you consider the following Polygon: ...
1
vote
1answer
90 views
0
votes
1answer
147 views

Contour plot show value change

...

15 30 50 per page