1
vote
1answer
104 views

Poor performance when evaluating double integral of hat functions

I am trying to evaluate a double integral but am having performance issues. First a bit of math I am using a Galerkin like scheme to discretize operators in an equation I am working with. The ...
3
votes
1answer
85 views

Bug with LinearProgramming on Integers?

With Mathematica 7: LinearProgramming[{1, 1}, {{0, 0}, {1, 1}}, {1, 1}, Automatic, Integers] gives wrong result {0,1}. But ...
2
votes
1answer
121 views

Represent more nested dataset with the same color in the PieChart

I have multiple dataset that I want to plot in PieChart, as in PieChart[{{2, 2}, {1, 2, 4}}, ChartLayout -> "Stacked"] Now here is the catch: I want the color ...
2
votes
1answer
142 views

Extra brackets of Position command

Command Position always comes with two extra curly brackets {{}} when it's just one index for the location. I use [[1,1]] in front of my position commands. Is there ...
1
vote
2answers
282 views

How to resolve the duplicate error during interpolation

I have few hundred data points corresponding to an irregular shape closed curve. As the result I have data points that have the same value of y but different values of x. I want to create an ...
0
votes
1answer
365 views

NMinimize to optimize function Module

I am using Nminimize for simulation based optimization. I define the objective function (simulation with a variable "a") as a module to be used in the minimization. ...
10
votes
3answers
357 views

Errors when plotting Exp[-x]/x for large values of x [duplicate]

I am trying to plot a very simple function f[x_]:=Exp[-x]/x on a log-log scale like this LogLogPlot[f[x], {x, 10^(-5), 10^7}] ...
6
votes
2answers
270 views

choosing the fastest way of finding position

I have this list {1,7,8,10} for instance. and a second list which is always smaller or equal to the first one say {10,7}. How ...
0
votes
1answer
121 views

Setting plot size within vector; dynamic slider (two part question)

I have a question about the size of a plot in mathematica. I'm working on some differential equations (a simplified model of heat transfer in a building). I've programmed it so that you can set ...
1
vote
1answer
101 views

A list containing zero elements

I have a list containing zero and nonzero elements. How can I throw away zero elements and just keep non zero ones.
2
votes
2answers
63 views

Finding series expansion in parametric setting

Suppose $y=f(x;p_1,p_2,...)$ and $t=g(x;p_1,p_2,...)$ are given where $p_1,p_2,...$ are some parameters. We want to find a series expansion of $y$ in terms of $t$. Is there a direct command or ...
1
vote
2answers
107 views

Minimizing the maximal residual in mathematica

With this: d1 = 10; d2 = 4; mat = RandomReal[{-1, 1}, {d1, d2}]; vec = RandomReal[{-1, 1}, d1]; LeastSquares[mat, vec] ...
1
vote
0answers
41 views

SQLDateTime from a time column is missing the milliseconds component

Can anyone confirm this? I am using M9.0.1 on win7 64bit connecting to a SQL Server db. When I fetch a datetime column the SQLDateTime objects contain 6 entries, 5 integers and a fractional second ...
2
votes
1answer
1k views

Contracting with Levi-Civita (totally antisymmetric) tensor

I have an array $v_{ijk}$ which is effectively a rank-$3$ tensor with dimensions $3\times3\times3$, and I need to contract it with $e^{ijk}$, i.e. evaluate $v_{ijk} e^{ijk}$ (see Einstein ...
7
votes
5answers
2k views

Something faster than Do loops with AppendTo

I am an "old" programmer used to Fortran and Pascal. I can't get rid of For, Do and While ...
2
votes
1answer
184 views

How to control the order of meshing?

I want the first pic,but i got the second. What can I do? Below if the code to produce the second pic: ...
8
votes
1answer
152 views

Experimental`NumericalFunction in NMinimize solution

I try to make a number of optimizations using this code: ...
0
votes
2answers
253 views

Histogram plot with descriptive statistics on the plot

I am wondering in Mathematica Can we generate histogram plot with descriptive statistics, such as mean, median, and skewness, attached to the plot ? For example, we may place all the statistics to ...
6
votes
2answers
295 views

Band Intensity Quantification

I would like to measure the density of my western blot band by measuring the area under the peak from this plot. More specifically, my image will have several lanes with a pattern of bands in each ...
0
votes
0answers
82 views

Speeding up Integrate and the numerical solution

I want to compute the drag of a plate Below is the code I am using to integrate the function ...
0
votes
0answers
112 views

Correctly set up FindMinimum

I am trying to setup the following minimization to align two astronomical images. ...
0
votes
0answers
136 views

Memory issue when using LinearSolve

When I use LinearSolve to solve a large system of linear equations where the left hand side is a matrix and the right hand side is a vector, the process takes a ...
0
votes
0answers
32 views

How to Invert a Multivariate Interpolating Function? [duplicate]

I used NSolve on a partial differential equation with boundary conditions to get a numerical solution that Mathematica says is of the form InterpolatingFunction. I then defined a function f(x,y) which ...
1
vote
1answer
85 views

blank null sequence acts weirdly [closed]

Could someone please explain why the ___ pattern matches the first but not the second case? ...
3
votes
1answer
132 views

How can I change label colors in a colored chart?

I am trying to make a chart with labels, but I would like for the labels on the chart to be white for purposes of visibility. I am aware of the ...
1
vote
1answer
109 views

Manipulates Behaving Badly--Why is it autoupdating?

In working on a simple simulation I came across the following Manipulate quirk (bug?) and I want to know how to get around it. Here is the first pass code, which acts as expected (but is incorrect): ...
9
votes
4answers
302 views

How can I generate and randomly assign color to annular sectors?

How can I generate such an image and fill every annular sector with a random colour?
2
votes
1answer
109 views

Explore a nested list

This question is similar to Numbering nested list according with Depth (or Level) I have a list like ...
2
votes
1answer
144 views

Getting MIDI SoundNote Pitches as Numeric Values

I'm trying to do some evaluation on notes (specifically the pitches) imported from a MIDI file. I've imported a list containing tracks of sound notes with ...
0
votes
1answer
236 views

Infinite expression 1/0.^(1/4) encountered in NDSolve

I am trying to solve very simple system of coupled differential equations using the NDSolve function, but I am getting ...
4
votes
2answers
277 views

How to use NIntegrate when there are symbolic constant coefficients

I would like to numerically integrate an equation such as the one below in which there are symbolic constant coefficients. I used a very simple code but it doesn't work in general, that tried to deal ...
0
votes
1answer
141 views

Fixed Point Math in MMA

I am working with a library that needs input in a Fixed Point notation. I’d like to figure out a way to convert the floating point results into fixed point representation. The fixed point length is ...
0
votes
0answers
45 views

Use TeX in Graphics object [duplicate]

Graphics[Text[Style["Sqrt[a^2-b^2]", FontSize->25], {0,0}]] yields: but I want the nicer looking $\sqrt{a^2-b^2}$ instead of the ugly "Sqrt[a^2-b^2]". ...
2
votes
1answer
99 views

Simplify using functional equations

Is it possible to simplify assuming a functional equation, for examlpe to use that one function, g, is the invers of another, f. Simplify[g[f[x]], g[f[x_]] == x] ...
9
votes
2answers
789 views

Connecting to Raspberry Pi's Wolfram Language kernel from a PC's Mathematica front end

Recently I bought a Raspberry Pi and I installed the Wolfram Language on it. Comparing WL 10.0's commands with Mathematica 9.0.1.0's commands, I found 328 additional commands and variables. I ...
0
votes
1answer
72 views

How to use ImageMultiply[] over a list of strings?

I'm trying to do the following: ...
1
vote
1answer
320 views

Series expansion using an exponential basis

I am currently trying to Laplace invert an expression with the following pattern $$ \frac{s \alpha \text{Cosh}[s(L-x)]+\beta \text{Sinh}[s(L-x)]}{s(\gamma \text{Cosh}[sL]+s \delta \text{Sinh}[sL])} ...
4
votes
0answers
170 views

Simulated Annealing Parameters and Results

I am using SimulatedAnnealing method for a simulation based optimization problem and was wondering if someone can enlighten me on the following features: Is there ...
0
votes
2answers
238 views

Defining Piecewise Functions in Modules

In short, my question is the same as my previous one except that everything is now wrapped up in a module. The relevant code I'm working with is: ...
2
votes
0answers
41 views

How does parallelization of LibraryLink function call work?

I'm trying to call a C function in parallel through LibraryLink. Here is an example kind of demonstrates that library function can be used in parallel. My question is what happened in the library ...
1
vote
0answers
281 views

Is there a way to stop evaluation immediately?

Sometimes I'll have a loop that I accidentally made too big. I'll evaluate, and MM will try to run through the entire loop. The program itself doesn't actually seem frozen... I can go to Evaluation-> ...
0
votes
0answers
64 views

Plot hangs Mathematica through NETLink

I have a C# function that calls Mathematica via Wolfram.NETLink. On our home computers all the test calls work perfectly, but on our AWS server (both a microinstance and a beefy c3.xlarge instance), ...
6
votes
4answers
282 views

Using an ellipse as a threshold for Nearest function

The Nearest function can receive as a threshold parameter a radius to look for elements inside that. From the documentation: ...
1
vote
1answer
200 views

Image basics in mathematica

1) How the pixel values are defined in mathematica or how it is different from matlab? 2) I am wondering how image properties are different in mathematica, and how they are calculated? ...
6
votes
1answer
235 views

Generating a (random) 2-dimensional cellular network

I want to generate a network of random cells like the following picture: The general idea is to generate some random points (x,y) as coordinate of a vertex and then randomly choose some of these ...
3
votes
1answer
100 views

How to calculate the residue of $1/f(z)$ at a numerical approximation to a root of $f(z)$?

The input Residue[1/DirichletL[19,10,s],{s,s0}] gives 0 even when s0 is a root. For ...
3
votes
4answers
459 views

How to build a funcion that returns a piecewise function

I dont know how to go ahead with this The problem statement is "Make a piecewise linear function maker that accepts lists of points as input and has a piecewise linear function as the output". Lets ...
8
votes
1answer
156 views

How to understand shared passing of a MTensor in LibraryLink?

According to the documentation, there are four different type of memory managing when passing a MTensor with LibraryLink: Automatic, "Constant", "Manual" and "Shared". The Automatic and "Manual" is ...
3
votes
1answer
176 views

Problems with series of generalized hypergeometric functions

I have been trying to do the following series: Series[HypergeometricPFQ[{1, 4, 4}, {4 - Sqrt[3], 4 + Sqrt[3]}, z],{z,1,0}] Mathematica says that the result is ...
0
votes
0answers
455 views

histogram fit for probability density

I am trying to fit the (probability density) histogram of some data with the exponential function, but I am having difficulties. My raw data are in file called ...

15 30 50 per page