# All Questions

1answer
151 views

### Variable number of controls in manipulate

i want to add a variable amount of variables to manipulate, but i got stuck at one point and can't figure out a solution (even after reading here for hours...). I have a function (e.g. here a ...
4answers
244 views

### Conditional ListPlot with text recognition

This is my data ...
2answers
176 views

### How to get the series coefficient of a function defined by a differential equation [duplicate]

I need a Taylor series approximation for $x(t)$, which is defined by the following differential equation. $\frac{dx}{dt}=-k_1 x+(1-x)k_2 e^{-k_3 t}$, $x(0)=0$ ...
1answer
72 views

### How to overwrite a private symbol value temporarily?

I have a package file mypackage.m with BeginPackage["FooBar"] Begin["Private"] tmp=2; foo=2*tmp; myprogram[foo] ... End[] EndPackage[] The file is VCS ...
1answer
554 views

### Plotting a moving ball for projectile motion with animate

Here is my code for plotting an orbit. What I want to do is have the "planet" shown as it orbits in the simulation. Can anyone help with this? ...
3answers
541 views

### Finding exponential model from data [duplicate]

I'm trying to find an exponential model from data for a homework problem. There is an accompanying video explaining how to do the bigger problem but it omits any instructions on the step where the ...
2answers
48 views

### Logical expression evaluations [closed]

Why TautologyQ[Equivalent[Implies[p, And[q, r]], And[Implies[p, q], Implies[p, r]]]] is True and ...
5answers
431 views

### Applying a function to a Dataset column conditional on another slot's value

How to apply a function to a column conditional on another slot's value? The Dataset documentation show only how to apply a function to named slots independently. The ...
1answer
228 views

### Finding root and plot it on the graph [closed]

Trying to Plot a function and find it's root and mark it with a red dot. ...
1answer
126 views

### Auto highlighting input cells depending on input expression (eg its Head)

Is it possible to programmatically highlight (eg, by change background color) an input cell conditional on the input expression's Head (or other attributes) upon evaluation? For example, would like ...
3answers
124 views

### Can I find constants in a function?

Let's say, I have a function with a constant, e.g. $y(x)=x+c$, and a condition $y(0) = 5$. I want to type in something like Solve[{y[x]=x+c, y[0] =5}, {c}] and get ...
1answer
144 views

### How can I resolve the insufficient memory to complete the computation problem for solving function with iterated variables?

I am trying to solve for a value x in a function where the variables varies with iterations of K. Also, there is one variable called "rvsum" which is updated with a certain formula as well. I have ...
0answers
94 views

### Why is it not allowed to define vectors of variables in a scoping construct?

The following command assigns 1 to a, 2 to b and 3 to c: ...
1answer
182 views

### Import selective elements from mixed (text and numbers) data file

How can I import only the 2nd and 5th elements (numbers, located in the 2nd and 5th columns) from all n raws of a data file (.xlxx) that contains both numbers and text. Imported data be inserted into ...
3answers
299 views

### have a function redefine itself as it maps through a list

I have a list which contains sublists, e.g. list = {{a,b}, {a,b,c}, {a,b,a,a}, {b,c}, ...} I then map a function through each sublist. This function should ...
4answers
387 views

### drawing core-shell structure [duplicate]

I am pretty new in Mathematica drawing. I am trying to draw a core-shell structure, it means a core sphere with a shell sphere, like this It can be in 2D or preferentially in 3D. Does someone can ...
0answers
39 views

### How to call a java method that takes a boolean (not Boolean)?

I'm trying to call a method on a java object that takes a single boolean argument - note boolean (native or primative) not Boolean (Object or Reference type). ...
1answer
106 views

### Select in complex dataset query

I want to use Select for a more complex dataset query. Part of the query shall be dynamic, depending on the user input. The Select part looks something like ...
1answer
95 views

### How to understand the extensional usage of Flatten? [duplicate]

Recently, I have been reading Mathematica program that written by many advanced Mathematica user, like Mr.Wizard, J.M., Kuba,etc to improve my programming capacity In the On generalizing Partition[] ...
3answers
663 views

### Find arc length

I am trying to find the arc length for using ...
0answers
210 views

### What is ColorEqualSigns and how does one use it?

I'm setting up the SyntaxInformation for a package I'm writing and I'm struggling to understand what the "ColorEqualSigns" ...
3answers
365 views

### Is there a way to rewrite integrals in Mathematica using u substitution?

In Mathematica, can I give it an integral and a few substitution rules and have it rewrite the integral in terms of those variables?
2answers
114 views

### Replace $z$ with interpolated function and plotting

I start off with this equation $z(x,y) = sin(xy)$. I create an interpolation from $0 < x < 5$ and $0 < y < 5$. I then use this interpolation on a simple function $w(x,y) = x + y + z(x,y)$ ...
5answers
713 views

### Coalition Games

Suppose an election produces the following result: result = {{"a", 120}, {"b", 80}, {"c", 50}, {"d", 30}}; Letters are parties and numbers seats. To form a ...
2answers
213 views

### How to propel the integration of time a little bit further? Numerical solution can not evolve to the max time

I try to solve a nonlinear partial differential equation. I obtain a numerical solution which can not continue to the max time I set, I always receive message NDSolve::ndcf: Repeated convergence ...
1answer
216 views

### Select data from a Dataset [closed]

I have a dataset that looks like ...
2answers
280 views

### How to specify units for ImageSize Option? [duplicate]

I'm trying out making a CDF and I want it to print within the margins of Letter paper. There is an ImageSize option that I would like to set; some plots will be in ...
1answer
210 views

### Coupled Nonlinear Differential Equations Problem

I have a big problem solving a set of coupled nonlinear differential equations using NDSolve. Solving the equations by themselves works quite well but if I want ...
3answers
422 views

### How to manipulate a circle in GeoGebra style?

I want to emulate the GeoGebra app. I want to get an effect like this in Mathematica. I don't know how to move whole circle without changing the radius of the circle. My sample code： ...
1answer
141 views

### Mapping over an association producing an unexpected result

The documentation for associations says that the keys of an association are transparent for many operations. Map is one such operation. However, I am confronted ...
1answer
130 views

### Changing the length of the vectors in vectorplot [duplicate]

I have the following code, and I've tried almost everything I can think of, even VectorColorFunction to describe magnitude. I am trying to make the length of the vectors proportional to r^{-2}, and ...
1answer
121 views

### How do I bandpass a signal in Mathematica 8

I would like to use the bandpassing function that is available in newer versions of Mathematica but not Mathematica 8: ...
1answer
256 views

### Second order differential equation

Hey guys I need someone to give me a hand on this. I don't know if this is too complicated or it's just the lack of knowledge I have on Mathematica. I'm trying to solve the following equation but ...
3answers
391 views

### Maximize violating constraints

I have Maximize[{(h*10)/(300*(100 - (l^.5 + d^.4 + H^.6))), (l + d + H + h) == 669, l > 0, d > 0, H > 0, h > 0}, {h, l, d, H}] I believe ...
3answers
307 views

### Wrong answer from DSolve?

I was trying to solve the initial value problem $$u'(t) = \sqrt{u(t)} + \frac{1}{n+1}, \, u(0) = 0$$ using DSolve: ...
2answers
199 views

### Solving with DSolve recursively

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

### ListContourPlot is blank

This is probably very simple. I want to do a simple ListContourPlot. ...
7answers
685 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 ...
3answers
268 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?
1answer
226 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: ...
2answers
655 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: ...
1answer
168 views

### Creating a table giving the statistics of random polynomials [closed]

I already have a formula for generating random polynomials as well as for counting the real roots of every polynomial (see my previous question). But now I face the problem of how to organize the ...
1answer
216 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] ...
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 ...
1answer
144 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 ...
1answer
152 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 ...
1answer
216 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 ...
0answers
262 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 ...
1answer
557 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?
3answers
240 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" ...

15 30 50 per page