All Questions

85 views

How to dynamically update a variable by using mouse over?

I want to extract the Graphics type when I hover my mouse over an object, but I failed to do so. Below is the code I am working on. Any suggestions are welcome ...
159 views

Is it possible to show Tooltips in a ListPicker menu?

Is it possible to show Tooltips in a ListPicker menu? This effect is possible using TabView, but I would much prefer using ListPicker. Below is a simplified version of my code. ...
487 views

Object differentiation in image

After purchasing a box of alphabet pasta for the kids, I wondered if there was way to extract the frequency of appearance of letters in the box by taken a sample and the analyzing the picture. ...
157 views

Expectation of GeometricBrownianMotionProcess

I am trying to compute $$\mathbb E\left[\max\left(\frac{S_{1/2}+S_1}{2}-K,0\right)\right]$$ where $K=100$ and $S_t$ is a geometric brownian motion (with $S_0=100$, drift $r=0.05$ and volatility ...
219 views

Trouble with NMaximize

I am having trouble with maximizing a function I am interested in. Below is the code I am using. ...
232 views

How can I selectively trigger computations in Manipulate?

I have a Manipulate that uses RandomVariate and Random that I would like to have redraw and ...
794 views

Using Mathematica in Conjunction with LyX. Path Issues?

I am attempting make life easier, and, instead of using Mathematica at the same time that I'm using LyX (a front end for LaTeX), I was hoping that I could just use LyX and use the CAS option to do ...
470 views

Highlighting Mathematica code in $\LaTeX$ document

I was thinking about the best way to include Mathematica code in a $\LaTeX$ document with a nice syntax highlighting. I have tried the packages listings and minted (with pygments), which both claim ...
1k views

Controlling ListPlot Line Colors

I am using ListPlot to display from 5 to 12 lines of busy data. The individual time series in my data are not easy to distinguish visually, as may be evident below, ...
4k views

How do you find the frequency and amplitude from Fourier?

Edit This is a popular question with several answers. This edit organises the answers and gives links. Fourier just gives y values (ordinates) if you wish to read off frequencies and amplitudes you ...
624 views

Solve[Tan[theta] == (b*Sin[t])/(a*Cos[t]), theta] breaks when “Reals” is added?

Mathematica solves this equation fine: Solve[ Tan[theta] == (b*Sin[t])/(a*Cos[t]), theta] // InputForm ...
121 views

Make Enter create new line break inside InputField [duplicate]

I would like to write multiple lines of text inside an InputField, using ContinuousAction->True to update some variable ...
1k views

Plot periodic function from Dirac delta function [duplicate]

Sorry for my bad english. I need to plot periodic function from dirac delta: δT(t)=∑δ(t–n*T), where T - is a constant, and n=-20..20 And after them, plot new function fd=f(t)*δT(t) - discrete signal ...
160 views

Searching for closest entry in a table

I have a large table of triplets whose structure is: list=Table[{a,b, RandomReal[]}, {a,1,100}, {b,1,100}] I would like to search through the list by looking ...
345 views

Solving an Integral Numerically

I have been trying to solve the integral equation below, but cant seem to find a way out of this. Can someone please help me out with suggestion? $f(t)=\int_0^{\infty}\frac{K_1a(t)}{a(t)+K_2}\,dt$ ...
349 views

My code is: ...
2k views

Finding equation of tangent line at a point [duplicate]

my function is defined as f[x_] = x^1.1 - 2.5 x^.5 I need to find the equation of the tangent line to the curve using the point slope form which would be something like f'[a][x+a]+f[a] a=1 and x=1 ...
114 views

Importing multiple tables within a single file

Suppose I have a file with multiple tables, each separated by a line beak, like this: ...
60 views

Telling mathematica that something is an integer [duplicate]

Is it possible for me to tell mathematica something is an integer? like if I typed Sin[n Pi]+Cos[n Pi] it would tell me it equals 1 for even n and -1 for odd n? ...
112 views

Is it possible to create a manipulate control with lower and upper value

I'm trying to create a manipulate controller to set four value. High and low temperature for both test and use conditions. The four values then go into a calculation. I can set these as four ...
553 views

373 views

ListContourPlot3D doesn't use all points

Edited thanks to @Kuba: In the following example, ListContourPlot3D accepts an array of points spaced at intervals 0.1 apart throughout the volume, but seems to choose an arbitrary number of points ...
1k views

How do I overlay multiple graphics on one plot? [duplicate]

I am plotting n spectrum using: ...
425 views

Calculate the centroid of a group of pixels with the same PixelValuePositions

My question is about how to recognise objects in a image. I would like to recognise objects of the same color. Then I want to calculate the centroid of these objects. I want to apply this calculation ...
116 views

Recursion when randomizing elements in a list

I want to randomize certain elements of a list; Since the code list = {a, b, c, d, e, f, g}; list[[{1, 3, 5}]] = RandomSample@list[[{1, 3, 5}]]; list works fine, ...
422 views

Convolve two sets of (x,y) data sets

I have two sets of data in the form a={{.1,2},{.2,3},{.3,4},{.5,6}} b={{0,8},{.1,4},{.2,7},{.3,1},{.5,10},{.6,3}} Both data sets have even spacing, although ...