3
votes
2answers
107 views

Manually accept elements of a list

Let's say I have a list like: {"good element 1", "bad element 1", "good element 2", "good element 3", "bad element 2", ...} I would like to build a function that ...
1
vote
1answer
119 views

Defining a function of a distribution

I have a discrete- time and space markov process that I want to evolve given an initial distribution. To that, I defined ...
0
votes
0answers
45 views

How to manipulate lists to get only part of the value [duplicate]

This is really a question about manipulating the output of Maximize. I have a function of 2 variables, defined thus: ...
3
votes
3answers
126 views

Finding specific compositions of an Integer

I need to find all compositions of an integer L wherein all parts do not exсeed l and parts less then l cound not be neighbor. Here is my code ...
2
votes
1answer
77 views

Read return value as string by Mathlink.h

I'm using "mathlink.h" to call Mathematica from a C program. I send a computation to Mathematica and its return result is a very big number (100 digits). Hence, I want to read that number as a string. ...
2
votes
1answer
514 views

Plot3D with a log scale only along the y-axis

I would like to ask how to make a 3D plot (maybe using Plot3D) with a logarithmic scale along the y-axis? For example: I have a function, $f(x) = 2(1 + a\,x^4)/x^2$, where $x$ varies from 0 to 20 ...
1
vote
2answers
187 views

How do I find the most populous cities in the world?

I am attempting to plot the most populous cities on a world map. Currently, I have the line of code: ...
0
votes
0answers
114 views

Getting increased accuracy for roots of determinant

I have a matrix $a(\kappa)$ from which I am trying to determine $\kappa$ by using the equation $det(a(\kappa)) = 0$. The matrices I deal with are on the order of 100 X 100 to 500 X 500. Originally I ...
1
vote
1answer
108 views

Random number generation from a given distribution [duplicate]

Is there any way to obtain random numbers from a user defined continuous distribution in Mathematica? Thank you very much
1
vote
2answers
187 views

Setting up and solving system of equations

Consider the following code: ...
4
votes
0answers
224 views

How to improve gesture detection by JLink for the LeapMotion controller

Building on this thread (where I cannot add anything anymore somehow) and with this nice answer I kind of got swipe detection to work, but it is not very responsive. How to improve (in the sense of ...
1
vote
1answer
159 views

Remove overlapping red and green color

How to remove overlapping red and green color regions, leaving only red ones?
4
votes
2answers
267 views

How do I evaluate a symbolic integral involving Hermite polynomials?

I want to test a difficult integral : Integral on all reals of some complicated function involving the Hermitian polynomials, exponentials, squares, factorials, and being general considering any ...
1
vote
1answer
143 views

Defining commutation relations with Flat functions

Here is a minimal example of the problem I am having. ...
7
votes
3answers
611 views

Hovering mouse cursor over a plot to display a “corresponding” point in another plot

(Apologies for not having gotten around to responding to and accepting answers on my other recent questions—as a meticulous and thorough type, I'd like to take my time to fully comprehend and ...
1
vote
3answers
158 views

Number theory: Problem involving rational numbers

Use RandomRat to test whether ((-1)^(1/Denominator[q]))^Numerator[q] is identical with ...
3
votes
1answer
424 views

Numerical solution of Bessel-like equation using NDSolve

I need to calculate solution of Bessel-like equation having general form: $\frac{d^2F}{dr^2}+\frac{1}{r}\frac{dF}{dr}+Q(r)F(r)=0$. Problems come from the points near $r=0$ leading to numeric errors. ...
2
votes
2answers
251 views

How to create a combined bar plot with time format?

I'm not sure how to add time format to bar plots. I'd like to be able to make one bar plot for one data set and another for another data set and then combine them, but I don't know how to offset each ...
4
votes
1answer
146 views

What is the equivalent of MATLAB's “timealign” function?

What is the equivalent of MATLAB's "timealign" function? Given two sequences (lists of values) and offsets, timealign will insert 0's into sequences to align them so they have the same number of ...
1
vote
2answers
143 views

Shortcut for Range[]?

I use Range a lot. Is there any syntactic shortcut for it, or do you always have to spell it out?
1
vote
2answers
151 views

ReplaceAll a list of rules to an equation

Given the following equation and rule, how would I Solve the equation for tr, k and ...
3
votes
2answers
616 views

Generating an Airy disk on a plane

I wish to generate a surface intensity plot of an Airy disk (or perhaps a two-dimensional Gaussian approximation to an Airy disk) on an (x, y)-plane at a specified coordinate. The hope is to have ...
1
vote
1answer
116 views

Two-way locator & slider controls

I was wondering whether it was possible to have a two way control system, whereby one could click and drag both the locator (which would in turn move the sliders), AND click & drag the sliders ...
0
votes
1answer
82 views

Select parts of Input Cell

One of my cells contains some Text and Input: some text 3+5, so the expression underlying this looks like ...
3
votes
3answers
132 views

A one-liner to place some number of Graphics3D polytopes on a plane and to randomly assign colorations

I'm looking for a nice one- or two-liner to randomly place some number, $N$, of Graphics3D polytopes on a plane with dimensions $X \times Y$, and to specify that $k ...
2
votes
1answer
74 views

How can I turn off generation of Dynamic elements by Histogram?

By default Histogram generates Graphics expression with embedded Dynamic constructs as can ...
1
vote
1answer
203 views

Split Lingustic(IPA) at Words Unique Sounds

How might I split a word at each IPA of each unique sound. For example {"pray", "wade"} (* {{"p","r","ˈeɪ"}, {"w","ˈeɪ","d"}} *) ssch answered a question here ...
0
votes
1answer
318 views

Solve the quadratic equation? [closed]

I can't seem to solve the general quadratic equation: Solve[ax^2 + bx + c == 0, x] Out[299]= {} It just outputs the empty list. How do I solve this equation?
0
votes
1answer
122 views

Merging two line graphs into manipulate command

Ultimately the goal is to make a manipulate command and turn a line into a circle. So I am supposed to take a line that is segmented into 12 equal lengths. ...
1
vote
1answer
148 views
2
votes
2answers
588 views

How to draw a coordinate system diagram?

I want to make drawings like these in Mathematica: I don't know if Mathematica is a gppd solution for drawing such images. If it is, please tell me how to do it; if not, please suggest another ...
4
votes
4answers
476 views

Perfect numbers

The question given to me: a. Find the perfect numbers between $1$ and $10^6$ b: Find the abundant numbers between $1$ and $1000$ For a, I wrote ...
1
vote
1answer
127 views

Control multiple locators along a plot

Update 1 @ Michael E2, my effort - for what it is worth!: ...
0
votes
2answers
91 views

Gaps in plots of equation solution from parameter

I'm trying to plot solution of system of equations as a function of parameter ...
2
votes
2answers
425 views

Locator to show coordinates of plot

Old I would like to make the locator follow a plot, giving the coordinates as it moves. I don't really know where to start with this one, but I would like the dynamic plot to look something like ...
9
votes
2answers
403 views

In version 9 PlotLegends, how can I remove the strange edges that appear around LegendMarkers?

I'm running Mathematica version 9. I am using ListPlot to plot two sets of data. For each data set, I am using different ...
1
vote
1answer
110 views

Passing f[x][[1]] to FindRoot [duplicate]

FindRoot seems to fail for most examples of the form f[x_?NumericQ] := {x - 3 , x^3}; FindRoot[f[x][[1]], {x, 3}] ...
11
votes
4answers
323 views

Using With to scope over pure functions

Consider this example: given an option for a function func as "x" :> (a&), how can one assign different values to ...
4
votes
2answers
306 views

How and when to use Evaluate?

A month ago, I used Mathematica to solve my experiment of the Test Technology of Mechanics Engineering. The exeriment is mainly about the Fourier Transform and verify the validity of the theory of ...
6
votes
3answers
182 views

Using PatternTest and/or Condition to detect equal list lengths as well as list element formats

On searching Mathematica.SE for information about overloading functions, I came across several threads about PatternTest and ...
0
votes
0answers
54 views

What are ways to debug while Mathematica is running? [duplicate]

I would like to know if we can "watch some values" during running time of Mathematica. I remember that C and Pascal compiler ...
2
votes
1answer
260 views

Animated Wave Propagation using Fourier & InverseFourier

This is a continuation off of previous help on the first part of my project: fourier issue arising from input miscommunication Now I want to go one step further in the current code. Here's the code ...
10
votes
1answer
1k views

Extracting information from the result of ContinuousWaveletTransform

I'm trying to analysis a signal and identify some time-frequency information of it. For example, around which time the specific frequency arrives. It appears that Mathematica has very powerful wavelet ...
7
votes
1answer
142 views

Fixing Spline curves so as to not overlap with themselves - (Diagrams)

Statement of the problem: Conceptually, what I'm trying to achieve is pretty simple. I have some code that generates a set of diagrams from a list of sets of points using BSplineCurve. Certain ...
0
votes
0answers
81 views

DSolve is rejecting my description of a system of PDEs

I am trying to solve a system of partial differential equations using DSlove. But i get the input equations in return. Dsolve is not doing anything ...
0
votes
2answers
116 views

Where are the functional programming constructs: `every` and `some`? [duplicate]

Coming from other functional programming environments (e.g., Clojure) I've become accustomed to some functions that I haven't found equivalents for in Mathematica yet. The two I reached for last ...
0
votes
0answers
148 views
7
votes
3answers
225 views

How to Flatten Array of Arrays of the highest order in a simple way?

I have a matrix of matrices, given in the following code. I want to flatten the array... ...
4
votes
2answers
207 views

Why does Mathematica stop when run in the background in command line mode?

If I try to start a Mathematica script in the background from the command line, like this: math -script someFile.m & then the process gets automatically ...

15 30 50 per page