# All Questions

98 views

### How to modify the file “KeyEventTranslations.tr” to use Enter to evaluate the current cell? [duplicate]

I asked the following question before, but I do not think it has been fully answered. By default, we use Shift+Enter to evaluate the current cell, and use Enter to get a new line. Is there a way ...
92 views

### Converting problem into form involving Probability

I want to solve the following problem symbolically, using Probability: What is the probability of the first random variate of a set to be present more than ...
111 views

### RSolve: Errors while solving Partial Difference Equation

I tried solving following partial difference equation in Mathematica by typing ...
600 views

### Convert list to sequence

I was just thinking how Tuples was created so , I came up with this, ...
169 views

### Performance on Multinomial Deviate is slow

Most of the time in my program is spent on this single line of code: out = RandomVariate[MultinomialDistribution[nt, tmp]]; ...
212 views

### Head of a MatrixForm expression?

An example in http://www-zeuthen.desy.de/theory/capp2005/Course/hahn/mathematica.pdf amounts to the following ...
151 views

### Factorization of a list with composite integers to a combined list of all prime factors

The following function io[aIn_] produces a list bOut containing ALL the prime factors of an Integer via the standard function FactorInteger[]. My code is: ...
375 views

### Speeding up Nonlinearmodelfit by constraining parameters?

I have a complicated parametric PDE that can be fitted to some data with NonlinearModelFit, but takes several hours to estimate the best values of the four free parameters. Currently, the code ...
222 views

### Manipulating sparse array elements

Suppose I have two sparse arrays ...
444 views

### NIntegrate(with singularities) gives different results, which one should I trust?

I am doing an Numerical integral with sigularities. ...
2k views

### What is the fastest way to extract a substring from a huge string?

I develop an algorithm to find the most common substrings of a given length n up to a certain distance l in front of a pattern p in a huge sequence S. E.g. I want to find the most common hexamers ...
160 views

### Resizing palettes

My eyes are weary and my sight grows dim, so I used the zoom control bottom-right in the palette. Unfortunately, having zoomed in the palette window cannot be resized - so I can't see the rhs - and ...
47 views

### Limiting scope of Front end “Replace All” in Find & Replace

The warning on find and replace isn't explicit and I only found out after an almost harmless global change that I really was replacing ALL, not just all instance in my selection (which is where most ...
77 views

### NMaximize issue and regularization

I want to maximize over the space (output of NDSolve, in appendix to the question) but I do not think this is strictly important in this case), to get the maxima of the solution as a function of time: ...
262 views

### Enumerate the 1-factors (perfect matchings) of $K_n$

Introduction I would like to enumerate the 1-factors, or (near-)perfect matchings, of the complete graph Kn. The adjacency list representation for Kn is basically { (x, y) | 1 ≤ x < y ≤ n }. For ...
166 views

### Selecting index position of data from a table that is less than a certain value

I have a table of numbers with a few thousand entries, and I'm trying to find the first index that is less than a particular value. An example of the table I'm working on is as follows: ...
476 views

### How can I define a 3d-body through different views? [closed]

In one of the maths blogs I follow I stumbled upon the following question: The bottom, side, and front views of an object are shown below: How would the object look in three dimensions? My ...
81 views

### How to make noncommutative multiplication agree with commutative multiplication

I need a noncommutative multiplication that is Associative Distributive $A**0=0$, $A**1=A$ Agrees with the commutative multiplication ($A**(k B)=(k A)**B=k (A**B)$) I have found a code ...
34 views

### Integration of any interpolation generates invalid comparison errors [duplicate]

Integrating a simple interpolated function as follows generates invalid comparison errors. ...
915 views

### Find the eigenvector associated with the smallest eigenvalue, not smallest in magnitude

I am trying to find the eigenvector of a $20000 \times 20000$ sparse matrix associated with the smallest eigenvalue. I realized that the smallest eigenvalue might be negative; for example, if the ...
190 views

I want to do padding of matrix a = {{x,x},{x,u}}; to ...
156 views

### How can I obtain more significant digits? [duplicate]

I type f1[x_] := 12 x^5 - 975 x^4 + 28000 x^3 - 345000 x^2 + 1800000 x N[f1[15.5], 15] and obtain 3.74112*10^6 BUT It´s not true!!! the result is larger than ...
71 views

### How to put Labels in of a list of number in a chart?

I can´t put the labels 0,....,31 in this simple chart on the usual place, or better just over the Top of each bar How should I do? ...
110 views

### Finding lags of time series with Do

I have generated two time series, S[t] and P[t] as follows: ...
132 views

### Counting Events in a moving date range

I want to count the number of times events take place in a date range. The counting is done over a window of e.g. 28 days where the goal is to have between 11 and 13 events in the time window. The ...
168 views

### Using StringCases and treating certain phrases as single words

My question is about StringCases. When I use this function, each word is separated by a ,. But I want some noun phrases like ...
105 views

### How to robustly apply ToBoxes to a Dynamic expression?

Inserting a Dynamic object in a boxform expression messes up syntax colouring. See the following example. where the variable ...
230 views

### How to embed a movie into a Mathematica-made presentation?

The question is completely formulated in the title. However, to make it more presize, I am making presentations for lectures. The presentations are done in Mma. I have some illustrative material to ...
193 views

### Join lists of lists with unique id

Sorry for the vague title, but I can't describe my problem properly and shortly. I am maintaining a list of players and their games with the following form: ...
735 views

### Collecting lists using Reap/Sow

I have a list like {{a,x},{b,y},{c,x},{d,z},{e,y}} and would like to produce from it a list formed by collecting all top-level elements whose second components are ...
195 views

### Is there a site where you can run mathematica without having to download anything?

I made a project in mathematica, and I have to present it in front of a couple of layman in two days, but I have to use school laptops and for some stupid reason I am not allowed to download anything ...
316 views

### Nonlinear fit with piecewise functions

I have an ensemble of data points $(x_i,y_i)$ and I need to fit them according to $y=F(a,b,x)$ if $x \leq x_{ref}$ and $y=G(c,d,x)$ if $x \geq x_{ref}$. The parameters I need to adjust are then ...
151 views

### How can I add drop shadows to the text of non-input/output cells?

Inspired by simon woods's wonderful shadow function, I want to add drop shadows to all the text of non-input/output cells in a notebook, something like this: By using simon woods's shadow function, ...
82 views

### An error message with NIntegrate and inability to plot the integrand

I took a function of x which depended on parameters on m,n,a,y and then first summed up the n from -Infinity to Infinity and then I set the other parameters to some random values and then I asked it ...
186 views

### Speed up Select on large list

I am running this on a very large list, it is important to notice that some times the dates in v occure several times, and I want the selected list to show the same amount. This produces the right ...
958 views

### Web Browser Screen Shot

I have Safari, Opera, Chrome, Firefox and IE installed how might a get a browser screen shot of a set of HTML code from inside Mathematica(for any of those browsers)? (Image is optional) The ...
59 views

### Given a list of pairs, average the second elements of pairs whose first elements match [duplicate]

Say this is my list: mylist={{1,4},{1,6},{1,11},{2,12},{2,14}} I want to do an operation that looks at the first element of each pairs, and for all those that ...
131 views

### How to convolve a Unit function (like “UnitTriangle”) with a InterpolatedFunction

Recently discovered what InterpolatingFunction's are in Mathematica...really amazing/useful. As I understand it, it's basically a curve fitter....sorta. So how ...
132 views

### How to model shocks to parameter in a dynamic system?

My simple model is: m[t_] := m[t] = m[t - 1]*p + 2 m[0] = 0 p = 0.5 I can plot the system as: ...
464 views

### Alternatives pattern in a function definition

I thought that I remembered a way to write a function definition using "|", but can't find documentation for it. So for example, I'd want to define: ...
869 views

### How to find the inverse a symbolic matrix that Mathematica thinks might be singular

I have a square matrix depending on a parameter "a". When "a" has a numeric value (eg 2.1 * 10 ^ 8) through the inverse function Inverse[] I can invert the matrix. If I write the matrix as a function ...
212 views

### Reconciling results from Fourier with those form FourierTransform

I need to use the discrete Fourier transform for function that represented as list of values. I started with an easy task to check my understanding. I tried to get the amplitude values for ...
75 views

### How to obtain SliceDistribution or StationaryDistribution for an ItoProcess when it is known to exist?

According to this reference page StationaryDistribution[proc] represents the stationary distribution of the process proc, when it exists. When I define the OrnsteinUhlenbeckProcess by the ...
144 views

### How to use some other driving process than the WienerProcess?

According to the following reference page http://reference.wolfram.com/language/ref/ItoProcess.html The driving process dproc can be any process that can be converted to a standard Ito process ...
114 views

...
137 views

### Expand Graphics based on all elements

How might I force the following Graphics element to expand to contain the Inset text? ...
280 views

### How to label the coordinates of the plotted graph?

How can I label the coordinates of the plotted graph? I want to label the coordinate of $(-1,-1)$. ...
242 views

### Symbolic solution of irrational equation

Is there any a nice looking solution to the following equation? eq[x_] := 2 x q1 - 2 q2/x^3 - (4 x^3 q3 - 4 q5/x^5)/(4 Sqrt[x^4 q3 + q4 + q5/x^4]) Better than ...