# All Questions

104 views

### Define variable relationships and dynamically update variables

I would like to define a relationship between 3 variables first and then later when I have filled two of the variables with a number, I would like to extract the value of the last value. For example: ...
755 views

### ComplexExpand absolute squared

ComplexExpand[Abs[a + b I]] Gives $\sqrt{a^2 + b^2 }$ ComplexExpand[Abs[a + b I]^2] On the other hand gives Abs[a ...
226 views

### Convert *.txt file

I would like to Import and Convert a *.txt file which looks like: https://docs.google.com/file/d/0Bw-308nJcF01Yl92RURCLUg4VzQ/edit?usp=sharing and turn it into a Matrix which I can use to make ...
1k views

### Mathematica Functions from VBA

I'm trying to call Mathematica functions from VBA (Excel) using .NETLink without success. (Yes, I know Mathematica Link for Excel exists. And yes, I know the proper thing to do is buy it. However, it'...
466 views

### Additional label on axis - 2D plot

I am finding a local maximum of a curve and I want to make the plot easier to read. I added a point to where the maximum is but I would also like to: 1) add a tick with text below it where the x ...
2k views

### How does one specify Neumann conditions for NDSolve?

I have a series of functions defined in my notebook, and then want to use this to solve a diffusion-reaction type equation. At the moment, something like this works: ...
3k views

### How to speed up the plot of NIntegrate?

Here is a toy example: f[t_] := NIntegrate[Sin[x], {x, 0, t}]; Plot[f[t], {t, 0, 10}] // Timing Even such a simple example will take 2.8 seconds on my computer. ...
353 views

### Caching of Graph Graphics

In this answer, Simon Woods concludes that when you display an expression with head graph more than once, something is getting stored somewhere. I looked into it too and found out this only happens if ...
190 views

### How can I import sound from within a Manipulate expression?

I want to import sound from a file, record, and import sound. ...
453 views

### ColorFunction based on data

I have a list of numbers, and I would like to plot them using ArrayPlot (which is easy, usually :)). I would like to be able to color the elements of the plot based on the average of the list: one ...
203 views

### How to delete duplicate solutions of this system of equations?

I want to find vertices (has integer coordinates) of the triangle $ABC$ with the centorid is $G(1,1)$ and orthocenter is $H(3,3)$. I tried ...
1k views

### Compute the rank of a matrix with variable entries

Say I have a matrix like $$M=\left( \begin{array}{c c c} x & xz & w-2x \\ wz^3 & xy & z \\ y^2-z^3 & x+w & z+x^5 \end{array} \right)$$ is it possible to ask Mathematica ...
8k views

### Finding Local Minima / Maxima in Noisy Data

I'm trying to find local minima / maxima in noisy data, consisting of data values taken at certain time intervals. Ideally, the function should take a pair of lists (one containing time values and one ...
724 views

### Problem with SerialIO package and Lego NXT

I'm following a guide from The Mathematica Journal that describes how to use Mathematica with the Lego Mindstorms NXT but have some trouble getting started and got stuck with the SerialIO package. I ...
7k views

### Making axis numbers larger on Mathematica plot

I want the numbers along the axis to be larger than the default value. Can this be done? The reason I am asking is because I frequently make charts in Mathematica and use them in Word. I export ...
284 views

### Problem with adding vector to symbolic function (for NDSolve)

I'm trying to set up a system of differential equations for passing to NDSolve. Note that my initial conditions are vector valued so Mathematica should know that ...
1k views

### Going full functional (Haskell style)

I'm trying to define some notation so that Mathematica code would be more functional, similar to Haskell (just for fun): currying, lambdas, infix operator to function conversion, etc.. And I have some ...
213 views

### Is there a way to show the details of a numerical computation?

I have recently started using Mathematica as a calculator while teaching (definitely overkill, but I try to use as few tools as possible). I would like my students to be able to trace simple numerical ...
233 views

### How can I create a new tables out of a table and plot it

I have the following problem. I have a table, call it m, which is labelled by 3 indices (say i,j,k), each of them running from 1 up to 100. I would like to be able to construct a new table which would ...
377 views

### Converting Mesh in Density Plots to a Graph

Consider the following line of code: ...
243 views

### Plotting a convolution fails [closed]

i'm trying to plot a graph of a convolution and a discrete convolution, using Mathematica 8 ...
836 views

### Matrix echelon/upper diagonal form

Is there a way to find the echelon form of a matrix in Mathematica? I see there is a function to find the reduced echelon form, RowReduce[], but I can't see ...
661 views

### Pass by reference for an option argument

Pass by reference can be faked by using HoldAll or something similar in the definition of a "Function". But can pass by reference be faked for symbols passed as ...
442 views

### Counting paths of a certain length between a source and sink vertex

I have a graph $G$, which may be directed or not, and I was wondering if there was an efficient way of using, say, BreadthFirstScan[] and FindShortestPath[] to count the number of paths between some ...
111 views

### Help with interactive plot? [closed]

The following interactive plot causes Mathematica 9 to become unresponsive. Could someone please tell me what is wrong with it? ...
565 views

### managing custom Ticks

I am trying to create a meaningful Operating Characteristic curve for use in Quality Lot Acceptance sampling. I have the following example (thanks to some help), yet when I alter the number of units ...
1k views

### Stereographic Projection

Say I want to represent points of the complex plane in the sphere $\Bbb S^2$ using stereographic projection. That is, the Riemann sphere: Specifically, it would be nice to be able to: Given the ...
521 views

### How can I find lines of a certain angle(s)?

ImageLines implements the Hough transform, but how do I search for only lines within some threshold of a certain angle(s)?
904 views

### Mathematica code for solving MHD viscoelastic fluid flow

Where might I find Mathematica code for solving MHD viscoelastic fluid flow using Homotopy Analysis method?
436 views

### Why the difference?

When I do the double sum using the sigma notation I get $$1 + \sum_{n=0}^{\infty}\sum_{k = n}^{\infty} \frac{1}{(k+2)k!}$$ $1 + e - \cosh[1]$ When I do the sums as below, I get the expected ...
874 views

### Why can't my new installation of Mathematica 9.0.1 find sysinit.m

I have just installed Mathematica 9.0 in a x64 openSUSE 12.3 machine using sh Mathematica_9.0.1_LINUX.sh as superuser. I have had Mathematica 8.04 working on the ...
2k views

### MathKernel.exe capped to use only 13% of CPU?

I am using a Windows machine with 8 cores. No other process than Mathematica 8 is using CPU time right now - still the MathKernel.exe CPU usage does not go beyond 13%. My current computation takes ...
704 views

### Combining Image3D and Graphics3D

I want to combine an Image3D and a Graphics3D using Show. Here is the code: ...
774 views

### Cannot save file

Hello I have a problem in saving files in Mathematica. I can't save not only notebooks but also figures. When I choose to save the notebook it open a window that says: Mathematica could not find ...
2k views

### Get Coordinates in Image Processing

I'm new to Mathematica. I'm very impressed about it's abilities. It's very easy to achieve complex tasks. But I fail the simple ones. How can I get coordinates in image processing? I'd like to ...
896 views

### Customize your FrameTicks in a MATLAB way

The figure below is made by MATLAB. However, the scientific form of numbers in FrameTicks that how MATLAB deals with is quite different from that of Mathematica. ...
310 views

### How to make the plot from geotiff format

I have a "GeoTIFF" format map, and I have imported it into Mathematica, then I used the Graphics to plot a point on the map. ...
608 views

### Montgomery Modular Exponentiation

I'm trying to write a Montgomery exponentiation based on this which can compete with Mathematica PowerMod. We know that PowerMod ...
331 views

### Linking points in separate lists in ListPlot (updated)

Updated: I have two lists (of different lengths) of co-ordinates, in the form {x,y,"tag"}, that I wish to plot so that one list is graphically linked to the other ...
808 views

### Passing an iterator [duplicate]

The code Table[i, {i, 5}] produces the output {1, 2, 3, 4, 5} whereas the code ...
131 views

### Can I force a function to quit and return some value after a certain amount of time has passed during its evaluation?

Imagine I provide some random input to function like FindInstance[], and I observe that, despite the existence of good solutions, the function will, with some ...
280 views

### Using NetLink to Import Excel File

I can import an Excel file into Mathematica easily: But when I try from .Net it fails: These are the commands and errors I am getting: ...
485 views

### 3d plot for function defined for integer values

I would like to make a plot of a function defined just for integer values, like f[n_, m_] := 2 - (1/IntegerPart[n]) - (1/IntegerPart[m]) If I try to plot ...
3k views

### How to take conjugate of a function?

Naïvely this is what happens and it obviously is not helpful! ...
3k views

### How do I define the domain of a function?

I have a function of two variables, f[x_, y_], and I would like to restrict the domain to values of x and ...
229 views

### Manipulate a Plot that contains a variable that contains symbol [duplicate]

This snippet mm = m Manipulate[{mm, Plot[mm x, {x, 0, 1}]}, {m, 0, 1}] (m is not defined anywhere) produces a sadly fixed ...
490 views

### How does FindShortestTour work?

How are FindShortestTour and the algorithms therewithin implemented internally? Also: Can I access some form of incremental, in-progress result during evaluation? (...
334 views

### Arbitrary depth patterns/rules

Temporary message: I am now really confused. I am not sure how using Power and Unevaluated together works in the examples below. While answering this question, I stumbled upon the following. We ...
I have an undirected graph $G$. How would I randomly assign directions to some fraction $p$ of the edges? How might I do this efficiently / quickly provided I have a large graph structure? For ...