# All Questions

34 views

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

Integrating a simple interpolated function as follows generates invalid comparison errors. ...
919 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 ...
191 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 ...
231 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: ...
740 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 ...
318 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, ...
83 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 ...
187 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 ...
963 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 ...
133 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: ...
466 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: ...
871 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

...
141 views

### Expand Graphics based on all elements

How might I force the following Graphics element to expand to contain the Inset text? ...
281 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 ...
126 views

### NIntegrate Warning / Error Messages

I am doing: NIntegrate[Sin[Exp[(x^4)]], {x, 2, Infinity}, PrecisionGoal -> 12] It prints out a host of warnings, but also shows the results as: ...
151 views

### DynamicModule updating unexpectedly

I have cut down a DynamicModule that was updating unexpectedly and found the following behaviour I don' t understand. If I do this I get one random value as expected ...
293 views

### Removing non-word characters from a string

I'm trying to get a list of words from a string. Sounds like an easy task for Mathematica. I have the following code: ...
103 views

### Alternate controls in manipulate

Is there a way to have two controls that govern a single variable in a Manipulate? Specifically, I am using a Locator to select an {x,y} coordinate, but I would also like the user to be able to ...
96 views

### Summing Multinormal Distributions

So, I'll explain the problem first. I have two populations that have values for two different channels (c1,c2). I've modeled these using MultinormalDistribution[]. I would like to add some noise to ...
82 views

### Extract the real components from a very large expression

Suppose I have a very long expression (>500,000 characters) which contains a mixture of real and imaginary terms. e.g ...
130 views

### Where Statement

Is there a "parallel" way to perform these operations? Indices = {} For[i = 1, i <= Length[w], i++, If[w[[i]] < 0, AppendTo[Indices, i]]] Which gives a ...
136 views

### How to convert multidimensional matrix into regular matrix?

I have this multidimensional matrix: {{{{a1, a2}, {a3, a4}}, {{b1, b2}, {b3, b4}}}, {{{c1, c2}, {c3, c4}}, {{d1, d2}, {d3, d4}}}} I would like to convert it into ...
378 views

### Multiplayer game in Mathematica: how to communicate between kernels?

This may have been asked already, but I am considering making a game in Mathematica that two people can play. However, the issue with my idea is that the other player can't view the cards of the first ...
89 views

### My plot is cut off if a frametick is “0” but resized if a frametick is “0.” Why?

I have been trying to customize the frame ticks and frame label around a certain contour plot and am running into very strange behavior where the graphics will get cut off by ...
135 views

### Finding minimum fly-by radius between Mars and spacecraft from interpolating function

I've written an interplanetary trajectory solver/plotter that plots the path taken by a spacecraft on an Earth-Mars mission, but have run into a little trouble when the spacecraft actually reaches ...
94 views

### Decompose Expression into Segments

Say I have an expression test = 3 x1^2 - 2 x3^-3 and I would like to decompose the expression into {3 x1^2, -(2/x3^3)}, I can do ...
114 views

### How to work with lists of functions

I have some lists of interpolated functions and I want to know if there is an easy way to operate with them. A simplified example: ...
780 views

### Using the epsilon tensor in Mathematica

I'm having a great deal of trouble getting started on a weekly homework assignment in Mathematica. The assignment requires we use the epsilon tensor which is apparently built into Mathematica as ...
68 views

### Integral not being evaluated

I'm trying to do the following integral, but Mathematica won't evaluate it - it just spits out the actual symbolic integral. \frac{e^{-\frac{(k-d)^2}{2 a^2}} \left | \frac{-d+\frac{c ...
68 views

### Plot Natural Log and Derivative Help

h[x_] := Log[2 x + xSin[x]] h'[x_] := (2 + Sin[x] + xCos[x])/(2 x + xSin[x]) Plot[{h[x], h'[x]}, {x, 0, 10}] Whenever I try to plot these two functions the plot ...
214 views

### Importing data to make a DateListPlot

I am having a hard time trying to import some text data for later use in DateListPlot. My first field in my data is a date of the format "yyyymmdd". I tried to ...
176 views

### Speeding up inversion of symbolic matrices by invoking caching

Is it possible to reduce the computation time taken to find inverse of symbolic matrices USING CACHING TECHNIQUES accessible (if any)? I am trying to compute inverse of symbolic matrices of size ...