7
votes
2answers
208 views

Solving with DSolve recursively

I need to find $f(x,n)$ in the interval [0,1] defined by recursion, \begin{equation} \frac{d f(x,n+1)}{dx} = f(x,n) \end{equation} with boundary conditions $f(0,n+1) = 1$ and $f(x,0)=1+ x $ Using ...
2
votes
1answer
206 views

ListContourPlot is blank

This is probably very simple. I want to do a simple ListContourPlot. ...
12
votes
7answers
705 views

Splitting strings into letter keys and integers

I have strings of the following form: string = "ABC123DEFG456HI89UZXX1"; Letter keys of variable lengths are followed by (positive) integers. I want to get this ...
8
votes
3answers
312 views

Efficient method to generate Tridiagonal 50 by 50 Matrix? [duplicate]

I'm looking to generate a tridiagonal 50x50 matrix, ideally without using loops. Suggestions on most efficient code for this?
7
votes
1answer
254 views

Incorrect result while using SemanticImport for CSV file import

I might use this incorrectly. I want to use a .csv file that (as list) looks like: ...
5
votes
3answers
1k views

Generating random symmetric matrix

Suppose first that I want to generate a matrix whose elements are independent and identically distributed (i.i.d.) with distribution dist. This is easy: ...
10
votes
1answer
227 views

Why can't a string be formed by head String?

Since everything is an expression in Mathematica, why must a string object be formed by "abc" but not by a String[abc] ...
5
votes
1answer
117 views

Determining the range of parameters that yield real values for a certain NIntegrate form

I have specified just one set of $s$ and $g$ values that yields a real value for the NIntegrate below. It is possible that some $s,g$ combination can give rise to ...
3
votes
1answer
155 views

Why does LinearSolve return the transpose of the answer matrix?

I am trying to solve an equation of the form $dv=F\cdot dV$ where $dv$ and $dV$ are matrices derived from the row vectors $dx$, $dy$, $dz$ and $dX$, $dY$, $dZ$ respectively. If it helps, $F$ is the ...
0
votes
1answer
213 views

Solution of differential equation in terms of incomplete gamma function

I need help in solving equation 15 and 16 either manually or in Mathematica to get the solution in terms of the incomplete gamma function. This is what Mathematica tells me. I can't understand ...
9
votes
2answers
341 views

Any packages for vertex enumeration on Mathematica?

My work requires me to enumerate all vertices of a polytope defined by linear inequalities from time to time. And I'm mainly working with _Mathematica 9.0 on Mac OS X 10.9. So I wonder are there any ...
2
votes
0answers
271 views

Generalize WASD Function First Person Viewing

How might I generalize the following WASD question such that it works with any Graphics3D object and includes q and ...
1
vote
1answer
740 views

How would I input this truth table into Mathematica or Wolfram Alpha

I am unsure how to put the negations after a gate or before a gate?
5
votes
3answers
263 views

Accurately distort graphics

I would like to accurately distort this plot of $\sin(x^{1/2})$ (and others like it) so that the wavelengths are evened out (ie - "inverse-square root" it). I should like to do the same to "de-log" ...
2
votes
3answers
314 views

How to test for Indeterminate values?

I need something like this a = 101010/0; If[a == ComplexInfinity, True, False] But if I use ToString, I get what I want. ...
1
vote
0answers
51 views

How to pattern match an association? [duplicate]

I have the following: Clear[a, b]; a = {{1, 2, 3}, {4, 2, 5}, {6, 7, 8}}; b = GroupBy[a, #[[2]] &]; b whose output is: ...
3
votes
2answers
177 views

Change font of formula number in DisplayFormulaNumbered

I am trying to change the font of the formula number in a cell which has style DisplayFormulaNumbered. I can easily change the font of the formula I enter by selecting it and using the format menu. ...
2
votes
0answers
102 views

Compile issues, scoping and order of evaluation

I have a few questions about compiling functions, which I think are all related to scoping and order of evaluation. I will illustrate them by a minimal example of the problem I have. I'm sorry for ...
4
votes
1answer
281 views

How to remove selected wire frames from bounding box in 3D plots?

In 3D plots one can eventually hide the whole bounding box by the use of option Boxed -> False. How to remove only a selected part of the wire frame that ...
2
votes
1answer
94 views

Probability evaluation fails with equals condition

The following evaluation fails (the result is just the copy of the input) $$\text{Probability}[0<x\leq a | x-y=t,\{x\ {ExponentialDistribution}[\lambda ],y\ {ExponentialDistribution}[\lambda ...
6
votes
3answers
351 views

How to count number of observations/rows within each group

I have a huge unbalanced panel data. I want to count number of rows within each group. For example, I have the following data: ...
9
votes
4answers
307 views

Multiple Forms of Transportation Between Cities

I want to be able to show different connections between cities based on modes of transportation. For instance, you could walk to any city, but it would take a long time, you could take a train, but ...
45
votes
3answers
2k views

Composition à la Mondrian

I would like to paint something like this or,even better, like this I have tried ...
3
votes
1answer
82 views

Changing face as you type in an expression in notebook

I've a Mathematica notebook for my class notes. When writing plain text in cells, I can dynamically bold and unbold with the ctrl+b shortcut. However, when in a mathematical expression, this shortcut ...
2
votes
1answer
217 views

How to use initial fixed timestep, then decrease it according to dependent variable, while spatial stepsize is fixed

I am trying to solve an advection equation. I want to force constant spatial step size (x dimension) with the “MethodOfLines” option, whereas I want to use initially fixed time step size 0.01 then ...
3
votes
1answer
230 views

Binning of listplot [duplicate]

I have two arrays describing a 1-dimensional mass distribution. The first array, $x$, are the (un-sorted, and un-evenly distributed) x-coordinates; the second, $m$, the corresponding masses. I would ...
0
votes
0answers
1k views

Converting a matlab program into Mathematica 10

I sought help from this entry at Calling MATLAB from Mathematica to see if I could CONVERT a mathlab program which simulates polymer dynamics that is provided at the download section at ...
4
votes
1answer
127 views

Why I can not get the plot when I use NDSolve`ProcessSolutions?

Why I can not get the plot when I use NDSolve`ProcessSolutions? Anyone can give me a clue. Thanks a lot! ...
2
votes
1answer
71 views

Improving working precision of LegendreP[n,x]? [duplicate]

I was trying to evaluate N[LegendreP[5,0.1]] The cell gives me: N[LegendreP[5,0.1]]=0.178829 However I wanted more ...
1
vote
1answer
314 views

Removing the unit “pm” from atomic positions [duplicate]

The following input yields an output with the unit pm (0.01 Angstroms), how do you eliminate this unit so that only numbers are generated. ...
6
votes
2answers
171 views

DeleteMissing level spec confusion

Given: titanic = ExampleData[{"Dataset", "Titanic"}] Why does this correctly delete Missing[] elements: ...
10
votes
2answers
690 views

Mathematica isn't sure whether a sum of two positives is positive or not

Mathematica is not able to tell whether a summation of two positive expressions is positive or not. Which is very strange. My three symbolic arguments, $x$, $y$, and $z$, are all real numbers bounded ...
1
vote
1answer
219 views

Axis Labels Disappear With Manipulate

I have a ListPlot3D with custom axis labels that I am scrolling with Manipulate. My issue is that the axis labels scroll away as ...
-1
votes
1answer
103 views

Is there a change in V10 with Solve and exponents?

I've encountered a strange problem with V10. I can't quite nail it down, but the Solve seems to be unable to solve equations that it could in previous versions. ...
2
votes
1answer
260 views

How to figure out whether a nonlinear inequality holds or not

I have an inequality consisted only of seven parameters as follows: $(1 + g)^{-(m+w)}\big[\big\{a+(1-a)(1 + g)^m\big\}(1 + p q)Q - (1 + g)^w \big\{(1 + g)^m (1 + q)-(1-p)q\big\} Q\big] < 0$ ...
3
votes
1answer
111 views

LibraryLink path problem

I have a library function that need to load some external data files. But it looks that the path in the default path of library function is the path that Mathematica is currently in. Is there a way ...
1
vote
2answers
277 views

Integrating Squared of Interpolating Function with respect to one variable

I am interested in evaluating a two dimensional interpolating function produced by solving the wave equation. Here is the code that includes the resulting interpolating function. ...
9
votes
2answers
313 views

Attaching a legend to BallAndStick picture

I am looking for a way to add a legend showing the identity of various atoms (with different colours) to this picture. Any Clues? ...
3
votes
0answers
83 views

k-means clustering in parallel

How can the k-means algorithm for some given distance function be implemented using ParallelMap or other parallel processing program constructs in Mathematica?
2
votes
0answers
72 views

k-means clustering using squared correlation in Mathematica

I am trying to cluster data using the squared correlation coefficient since in the case of my data, -1 correlation is equivalent to 1 correlation (polarities do not matter). How can this be done in ...
6
votes
6answers
196 views

Join decimal part

I have a list of mesures that each vector is like {0,1,-2,259} but it should be like {0.1,-2.259} So I did a rule, like ...
14
votes
6answers
944 views

Finding all paths of certain length between vertices in path graph, non-simple ones too

First I will tell you what my ultimate goal is, because maybe there's another way of doing it other than what I am trying. I need a list of all $(a_1, a_2, \ldots, a_N)$ tuples that satisfy certain ...
2
votes
0answers
83 views

How to make a new analytic function work seamlessly with Mathematica's analysis functions?

I am defining a new analytic function of six variables. I have algorithms to evaluate it numerically, and have amassed a large catalog of analytic properties. It is easy for me to program the ...
3
votes
1answer
115 views

Inverse prediction function

I am trying to write a code which learns a data set. Now, I want to know the input value for a given output value. Consider, the following code ...
4
votes
1answer
189 views

Convert Locator (x,y) values to Lat/Lon as per GetCoordinates on Map

I want to convert the (x,y) coordinates you get from using a locator on a map to Lat/Lon coordinates - exactly like the GetCoordinates tool does when you right click on a map. ...
1
vote
1answer
96 views

How to checkpoint computations?

Suppose I do some big experiment, presumably in a Table[], or a ParallelTable[]. Experience shows that there is a non-zero ...
4
votes
3answers
335 views

Combining more than two lists by first column as index

Please bear with me. It might be easy but its been hard for me. I have say three lists: ...
1
vote
2answers
610 views

Plotting an orbit using first principles [duplicate]

I am fairly new to Mathematica, but I am trying to plot an orbit of the Earth around the sun using the equation: $\quad r(t+dt) = (2 - G*M*dt^2/r^3)*r(t) - r(t-dt)$ I need to break this into ...
2
votes
1answer
1k views

Running a Mathematica Notebook from command line and saving the output [closed]

I am working on a project that requires some calculations to be done in Mathematica. I don't know Wolfram language and I don't have the time to learn it (I am using a 30-day trial) so I have a python ...
2
votes
4answers
179 views

Precision problem with numerical solution of a differential equation

I want solve $$ 2\sqrt{|\gamma|}x = \int_{1}^{t} dy \sqrt{\frac{1+2|\gamma_2|y}{y^2(1-y)}} $$ where $0<t\leq $1. I'm using a for cycle to evaluate t, calculate the integral and the assign the $x$. ...

15 30 50 per page