# All Questions

207 views

### Simpler way to repeat an execution with 2D points?

q has the coordinates of quadrilateral. I can get the output below with brute-force but I want to find a simpler solution, perhaps something like f<-q[[1;;2]]. ...
272 views

### Compiled function error - nontensor object created

I'm trying to optimize code that uses Position MANY times. The following toy code works: ...
162 views

### How can I permute a multiset?

I have a multiset {1, 3, 3, 1, 2} and would like to randomly permute the classes like so: {2, 1, 1, 2, 3} or {3, 2, 2, 3, 1}, what is the simplest and most efficient way to do this? In reality the ...
88 views

### Page Break Adjustment In Long Documents

Has anyone else had trouble in relocating page breaks in a long document? In a ~45 page long document I wanted to keep certain things on the same page. The system worked on the first three or four ...
119 views

### Evaluation of Notebook chosen by FileNameSetter

Please consider the following: I have created a GUI where I can choose the path of a notebook (which I need for later calculation) via ...
122 views

### LeastSquare Solution for the Continuous Time Lyapunov Equation

I have been working with a problem which involves solving the continuous time Lyapunov equation $$A R + R A^\top = G$$ for the symmetric positive definite matrix $R$. Here $A$ is real, invertible ...
158 views

### Why is the CTRL + / not working?

I've learned how to use this shortcut to input fractions in the 2D form, it worked nice on my notebook but I can't make it on my desktop. Any tip on what could be happening?
143 views

### Mathematica's external controllers?

While reading the Manipulate reference I've noticed this line: What are the available external devices for that? Some months ago I was thinking on what would be needed to use a MIDI Controller ...
426 views

### Map a 3D plot into plane

I have a 3D plot like: ...
87 views

### How to insert or use the PackageTemplate?

In the system resource file MiscStrings.tr there is a template: ...
143 views

### Enhancing GraphUtilities' GraphEdit

One thing I use Mathematica for is building molecular graphs. Until now, I've been content with generating an adjacency matrix from SMILES data, and passing that to ...
287 views

### Assessing argument type in set delayed function definitions

I'm wondering how to properly assess the type of arguments passed to functions defined with :=. I want my functions to be the most efficient, unambiguous and clear ...
169 views

### Programmatically minimize mathematica?

I can minimize a notebook easy enough with Mathematica code, but how does one minimize all of the Mathematica front end? Just as if you clicked the minimize button on the menu bar? This is for ...
223 views

### Importing tabular data that has been exported from Evernote

In Evernote you can embed HTML tables in the note. You can then export them to an xml format with the extension enex. I am trying to get the data from the table imported into Mathematica. Here is the ...
318 views

### Drawing outside Plot area

I want to programmatically draw some objects outside the Plot area in my Plot's Epilog, like in this dummy: I found PlotRangeClipping and hoped that would be the ...
138 views

### Notebook with a WindowOpacity too small becomes “click-through” for mouse

I created a notebook and was manipulating its WindowOpacity option: ...
145 views

My code: ...
2k views

### Programmatic approach to HDR photography with Mathematica image processing functions

The High dynamic range imaging (HDR or HDRI) direction in photography and image processing became very popular recently. Besides obvious photo art applications (see examples), there are many great ...
487 views

### Complex number operations: telling Mathematica variables are real

I want to do Conjugate[a + b*I], but when I do that, the solution is Conjugate[a] - I*Conjugate[b]; when for me, a and b are ...
165 views

### How to highlight various parts of a plot

I'd like to show students a graph of a function, say $(x,y)\mapsto\sqrt[3]{x^3+y^3}$, and then highlight its various properties connected with (non)differentiability at certain points etc. Having ...
394 views

### Programmatically move the cursor to a desired location on the screen

Is it possible to set/move the mouse pointer's location directly from Mathematica without using external tools like Run["xdotool mousemove x y"]?
303 views

### Take screenshot of the entire desktop using Mathematica

Is it possible to get a screenshot of the entire desktop directly in Mathematica? I am on Ubuntu running Mathematica 8. For some reason GUIScreenShot[] fails. But ...
251 views

### Very fast way to do a coordinate frame transform

I need a function that rotates and translates a huge amount of line segments. For example, I have a set of line segments in the form {{x0,y0,z0},{x1,y1,z1}} ...
317 views

### Is it possible to produce anaglyphs with Mathematica?

I'd like to prepare some presentations in Mathematica to help students visualize functions of two variables (it's a usual calculus course). I thought it would be both cool and useful to have the ...
115 views

### Omit part of a 2D plot [duplicate]

Possible Duplicate: Generating a broken or snipped axis in ListPlot I am interested in removing a part of my plot, after searching around I could not find any questions concerning this ...
395 views

### Unique[] symbol not properly tracked

In a nutshell, why does this work (change y and see how the value updates) ...
379 views

### Reversing one axis in Plot3D

When I rotate my 3D plot to the desired viewpoint my X axis runs from 1 at the left to 0 at the right. How can I mirror my plot so that 0 will be at the left and 1 at the right? Extra credit: how ...
166 views

### Creating a Nearest function programmatically

I've been trying to work out how to create a Nearest function programmatically. My goal is to produce something similar to this, a hand-assembled function: ...
518 views

### Change variables in differential expressions

I have a fairly complicated differential expression in terms of a variable r and two unknown functions of r, B[r] and n[r]. I want to do a Taylor expansion of this around r=infinity. I want to do this ...
1k views

### Plotting contours plot for f(x,y,z)=c

I have the following question: I have a file that has structure: x1 y1 z1 f1 x2 y2 z2 f2 ... xn yn zn fn I can easily visualize it with Mathematica using ...
259 views

### Constructing lists by applying functions to another list

Suppose f is a function of two variables: $f = f(x,y)\quad$ and $L$ is a list. Could someone help me in defining a list of the form: $D = \{f(x,y)\ |\ x \in L,\ y \in L\}$ I tried this: ...
87 views

### Importing parts of Packages

Some programming languages offer the possibility of importing a single function from a library, as in from x import y I'm looking to import only one function ...
221 views

### Rectangle wave OK in calculations, wrong in Plot

I have a Piecewise function consisting of two rectangle waves with different duty cycles: ...
337 views

### Expected Value - Mathematica

I would appreciate if one could help me with the following Mathematica problem: Assume $X$ is an exponential random variable with unit mean ($f_X(x)=e^{-x}$, $x>0$). I want to calculate expected ...
225 views

### Sum or Product with Exclusions

Is there a built-in feature for handling things like: $$\sum_{i=0}_{i\ne j}^n\frac{a-a_i}{a_i-a_j}$$ and $$\prod_{i=0}_{i\ne j}^n\frac{a-a_i}{a_i-a_j}$$ or should I work out some sort of Do ...
117 views

### How can a Button be shifted to perform its action

I have a Panel with 4 Inputfields and a Button. When a ...
307 views

### Open two copies of the same notebook

Is there a way to open one notebook in two (or more) different windows? This can be helpful when working with a long notebook and one wants to edit one part of it while looking at a different part. ...
466 views

### I failed to solve a set of one-dimension fluid mechanics PDEs with NDSolve

@DNA The fluid here has been assumed as single component perfect gas i.e. it obeys the equation P=ρRT, the thermal conductivity is assumed as a constant, so the equation is: ...
234 views

### The gap between MapAt and ReplacePart for 2D data tables with headers

Consider a relational table derived from survey data, where each column ("001-01" ...) represents a responder and each row (...
203 views

### Can JavaScript query the actually used dimensions of an HTML embedded CDF?

I have an HTML embedded CDF on my website. The size that is actually being used up by the single manipulate in the CDF changes when you use the CDF; you can make more sliders appear, and then it will ...
339 views

### Convert Graphics3D containing BSpline to polygon primitives for export to 3DS?

Graphics3D[] objects created with BSpline functions will not export to 3DS format, which only supports the more basic primitives. Is there any straightforward way ...
303 views

### Symbolic manipulation with unevaluated sums

If I have two expressions with sums in them, like this: \begin{align*} b&=\frac{\sum_{i} (x_i - \bar{x})(y_i -\bar{y})}{\sum_{i}(x_i -\bar{x})^2}\\ r&=\frac{\sum_{i} (x_i - \bar{x})(y_i ...
405 views

### Trying to fit an unknown extreme distribution

First up, I'm quite new to Mathematica so any hints on better code would be greatly appreciated. I have some histogram frequency data from an unknown distribution that I'm trying to fit. Here's the ...
161 views

### Importing file with UCS-2 Little Endian codification

I'm trying to import a text file with UCS-2 Little Endian codification but I can't read it correctly. There's any hidden option to read this files ?? I'd tried with ...
399 views

### Grabbing a number of characters around a string pattern

If I have some string data: text = StringTake[ExampleData[{"Text", "DeclarationOfIndependence"}], 400] "When in the Course of human events, it becomes ...
536 views

### Solve system of equations related to perspective projection

I'm trying to solve system of equations. I have 4 points before perspective projection and after and I whant to obtain matrix of perspective projection $m_{i,j}$ ($x,y,u,v$ are known , $m_{i,j}$ ...
232 views

I'm looking for a robust way to add vertices to a graph by modifying its AdjacencyMatrix. Here's what I have so far: ...
420 views

### How to perform a depth-first preorder traversal of an expression?

Due to confusion of terminology on my part I asked the wrong question before. Since it has already received other answers I shall not edit it, but instead ask the question I meant to in the first ...