10
votes
6answers
3k views

Finding the centroid of the area between two curves

When I have an area bounded by curves, is there a built-in way to find the center of the area? Or do I have to plot it first and then use ComponentMeasurements on ...
2
votes
1answer
167 views

GUI of a Karnaugh Map (2)

Adopting kguler's answer to my previous question, I managed to get the simplified map by using Mathematica's build-in function BooleanMinimize. The tough job left ...
6
votes
2answers
145 views

Dataset with no members

I am trying to plan a framework for relational algebra using the Dataset capability of Mathematica 10. In the work of Date and Darwen, there are two concepts known as TABLE_DEE and TABLE_DUM. ...
0
votes
0answers
42 views

1D bin packing solution with NMinimize or NMaximize (use minimal office space) [on hold]

I want to use NMinimize to solve a 1D bin packing problem. The goal is to assign a large number of staff to as few rooms as possible. The empty rooms can then be sub-let and generate income. Hence ...
16
votes
3answers
267 views

Error changing Dataset using Part

In the new guide Computation With Structured Datasets we can find this part, on how to change a Dataset But if we create a Dataset like: ...
6
votes
1answer
89 views

Sqrt disappeared when exporting plot to PDF in version 10

In version 10, if we plot with Sqrt in y-axis, and export to PDF, the square root disappears in the PDF file. ...
0
votes
0answers
92 views

NSolve for large models

I'm a Mathematica rookie running version 7.0 for Mac OS X x86 (64-bit) (February 19, 2009) on a 2010 MacBook Pro. (I'm also a stackexchange "newbie" who originally posted this on stackoverflow, thus ...
3
votes
0answers
60 views

Using Mathematica to help obtain correct analytic formula for logarithm integration

I need to program into my Mathematica code the analytic form for the result of the integral: $$I(a,b)=\int ^1 _0 dx \frac{\ln(x-a)}{x-b}$$ that is valid for all complex $a$ and $b$ (but $\text{Im } ...
6
votes
3answers
168 views

AssociationMap to query Dataset across levels?

Is there a way to operate on Dataset across levels to apply a function f to a key -> value pair in an Association as follows: ...
13
votes
1answer
218 views

How can I mend this broken heart?

Try to evaluate the following code: ...
9
votes
4answers
244 views

Possible bug in Dynamic

The code below crashes the Mathematica kernel in version 10 (not in V9) every time I run it on Windows and on Mac OS. I've sent it to WRI, but was told that they could not reproduce the crash. Does ...
1
vote
1answer
37 views

Conditions in SparseArray

I got confused by {i_, j_} /; in the following code. I didn't see an explanation in the SparseArray documentation. Can anyone ...
3
votes
1answer
41 views

Calculate geo location based on distance from other locations

Given a list of entities (or GeoPositions) and their distances from a particular location, how do I find that location's ...
2
votes
2answers
82 views

Utility information using FindGeoLocation in Ver.10

It is possible for some commuters to track the location of their bus, train or tram through a personalised GPS tracking device (e.g.see ...
6
votes
0answers
92 views

Partial Differential Equation in Parallel

is there any native way to implement multi-core parallel solving of PDE in Wolfram Mathematica? WM 10 now supports Finite Elements Method, but it is actually useless without parallelization. Usually ...
0
votes
1answer
152 views

Minimize: How to work with specific numeric types

This is a question about the use of symbols in Minimize and how to persuade Mathematica to treat them in a specific way (as integers or rationals) that I have not ...
2
votes
2answers
86 views

TrueQ returning False on true statement

Why does TrueQ return False on the following? TrueQ[Log[2]/Log[8] == 1/3] (* False *) ...
2
votes
1answer
42 views

NDSolve: EventAction list specification using Table fails

I have an NDSolve problem that needs a list of a large number of events that are generated programmatically. Here is a simple example that demonstrates the problem on Mathematica 7 and 8 (the versions ...
1
vote
2answers
80 views

eccentric anomaly expansion equation

I try to use this simple algorithm (paper) to calculate the Eccentric Anomaly expansion: ...
2
votes
3answers
247 views

Create a list of random reals

How can I create a list of random pairs $(x,y)$ where $0<y<x<1$ and $x,y \in \mathbb{R}$ ? I can't seem to place that inequality restriction on the random numbers that are generated.
5
votes
1answer
351 views

Estimate parameters of the state space model

I'm using Mathematica 9 and its Control Systems functionality. I've searched the references extensively but seem not to be able to find any examples of state space model parameters estimation. All ...
6
votes
2answers
86 views

One ChartLegend for multiple charts in Dataset?

Dataset's documentation shows how to leverage GroupBy operator at multiple levels ...
5
votes
2answers
173 views

Line style thickness differences between Mathematica 9 and 10

I execute the same code in Mathematica 9 and MAthematica 10, and have this different results. ...
1
vote
2answers
96 views

Minimize loop optimization

I'm new in Mathematica 10. So far, I have a two variable-function and I've use Minimize to find the optimal solution. Nevertheless, I'd like to make a sensibility analysis and study how this optimal ...
3
votes
1answer
61 views

how to write TableForm expression into file?

Now I have a list stored in data as follows data = {{"Ca", 1, 1, 1}, {"Ca", 2, 2, 2}, {"Ca", 3, 3, 3}} the ...
4
votes
3answers
168 views

Spike train representation

I have a spike train. The data shows the time at which the neuron fired a spike. I want to plot them like this picture: Here is the data for one spike train which corresponds to the one of the ...
13
votes
2answers
417 views

How to embed an image into a string?

Note: The bug described in the post is in Mathematica 9, and has been fixed in 10.0. The documentation for String contains the following statements: Strings ...
4
votes
2answers
150 views

Extrude 2D cross-section to 3D shape with shrinkfactor

I would like to create a 3D shape from extrusion and scaling of a 2D contour. The 2D contour that I have looks like this: and it consists of a bunch of points (here plotted with ...
0
votes
0answers
36 views

How to correctly use PatternTest (?) [duplicate]

This works fine: {3, -5, 2, 7, -6, 3} /. x_ /; x < 0 :> 0 (*{3, 0, 2, 7, 0, 3}*) and this works fine: ...
2
votes
2answers
679 views

About generating power series

For an arbitrary function $f(x,y)$ I am defining functions LogMT1 and LogMT2 as follows, ...
11
votes
1answer
126 views

Geographic background containing both outlines and contours: how?

I would like to create a map which will show lakes and rivers together with elevation contours and contour labels. What is the simplest way to do this with ...
7
votes
0answers
376 views
+50

Symbolic integration in real domain only ( assumptions and ComplexExpand don't work)

Integrate[m^2/((x - m^2)^2 + y^2), m] mathematica gives me a complex-valued reuslt, but maple 17 gives me what I want. I tried using assumptions, but it doesn't ...
5
votes
1answer
129 views

How to slice TimeSeries data?

When retrieving curated data, v10 now returns TimeSeries objects. For example, ...
6
votes
3answers
107 views

How to transpose x and y axes on a LogPlot?

Consider the following simple LogPlot: LogPlot[Exp[x],{x,0,5}] Is there a nice way to switch the axes of a LogPlot? I'm aware that plotting the inverse ...
0
votes
2answers
52 views

Changing the data indices for a large dataset plotted with ContourPlot

I have a large (square) dataset that I am plotting with ListContourPlot ... The data is 128x128 -- without coordinates for each point. I.e. - {{0,0,1,0,...,0},{0,2,1,1,...,1},...{3,1,1,1,...,2}} So ...
0
votes
0answers
37 views

Finding Roots of Non-linear Systems: Rescaling polynomials

I'm trying to get all isolated finite equilibria of a moderate multi-dimensional non-linear system of equations. Particularly I have 9 independent variables and third order at most. It turns out that, ...
4
votes
1answer
105 views

Agglomerate output to Graph

I'm using the HierarchicalClustering package to cluster some data. So let's say I have this: ...
2
votes
1answer
74 views

Aborts and beeps without error warning

I have a piece of code that generates a figure, performing a calculation to generate each pixel. At a certain resolution it runs fine, but after a high enough resolution it fails. Mathematica beeps ...
2
votes
0answers
39 views

How to avoid joining MathieuCharacteristicA in a plot? [duplicate]

In the documentation As a function of the first argument, MathieuCharacteristicA is a piecewise continuous function So how to avoid joining different pieces of the function? For example, ...
-2
votes
0answers
28 views

EvaluationMonitor is evaluating up to 3232 steps [on hold]

I have the following objective function which I want to minimize using simulated annealing. fourVertIsoHamilt[x11_, x12_, x13_, x14_, x21_, x22_, x23_, x24_, x31_, x32_, x33_, x34_, x41_, x42_, ...
0
votes
0answers
48 views

Ordering oscillators with negative powers: Infinite loops

I have been working with ordering of oscillators for example $[a,a^\dagger]=1$ and I have a fairly stable code. I have needed to use inverse oscillators for example expressions like $a^m ...
0
votes
0answers
25 views

Asymptotic expansion on 3 nonlinear ordinary differential equations

The 3 nonlinear differential equations are as follows \begin{equation} \epsilon \frac{dc}{dt}=\alpha I + \ c (-K_F - K_D-K_N s-K_P(1-q)), \nonumber \end{equation} \begin{equation} \frac{ds}{dt}= ...
3
votes
1answer
143 views

DynamicModule inconsistent behavior; was: DynamicModule persistent UI changes

Update: I'll restate the question in hopefully more terse and clearer terms. To illustrate the issue, run this and save the resulting notebook: ...
4
votes
0answers
40 views

Connect Frontend to Kernel Started by JVM via JLink

I have a MathKernel started and controlled via JLink from a JVM. The $CommandLine for this kernel is: ...
2
votes
1answer
33 views

Can I use what “headerlines” removes from a CSV as TableHeadings for the table I create from that File?

I am reading in some data from a CSV file that has a line which gives titles to each "column". Here is an example: ...
0
votes
0answers
38 views

Complex infinities in an Euler-Lagrange equation

I now wish to solve for $L(t)$ and $H(t)$ some ugly Lagrangian (in the code below) in configuration space, respectively the length and the height of a system. I tried running the code below, with the ...
4
votes
0answers
160 views

Problems extending NelderMeadMinimize into 2D

I've been playing around with Oleksandr's compiled Nelder-Mead Minimization function presented here: Shaving the last 50 ms off NMinimize First, I'll create some sample data. This creates a noisy ...
6
votes
1answer
847 views

Linear programming with many variables and parameters

I am trying to reconstruct the answer that is given in this report. (page 153 in Appendix B; Section B.2.1). They are given variables, parameters, constraints, and the objective function to minimize. ...

15 30 50 per page