# All Questions

246 views

### What's the best way to generate all the upper triangular matrix whose singular values are given?

For example, given $\lambda_1 = 1, \lambda_2 = 2, \lambda_3 = 3$, what's the best way to generate all the upper triangular matrix ($3\times 3$) whose singular values are $\lambda_i$? Note:Given a ...
82 views

### What are the limits of the Prime-functions? [duplicate]

Will Prime and PrimePi test up to 3 * 10^12? Where can I find the limits for these funtions? ...
209 views

### Call Haskell from Mathematica and return the results inside Mathematica

I would like to learn Haskell using Mathematica's environment. I know there is the RLink protocol. Is there a similar protocol for Haskell?
74 views

### is there an option for FitResiduals in FindFit?

I know this option exists in NonlinearModelFit and probably in other fit models as well but for some reason the best result i get is with FindFit. Regards Doron
222 views

### Plot a cone in spherical co-ordinates

As we all know in spherical coordinates a function phi = π/3 gives us a cone. The cone makes an angle of π/3 with the imagined ...
82 views

### Convert Integer to Numeric with Replacement rules

I have a long list of triples, each looking something like {AGO, 1988, 2345.23}. Some of these, however, have an integer in the third spot, like this: ...
76 views

### Slider moving in irregular steps

Sorry - bit of a yes/no question: Is it possible to make the slider from a manipulation jump in irregular steps? Or would the best way to overcome this be to just create a series of buttons that jump ...
148 views

### Unexpected design of protection against dynamic content

Introduction/summary I was surprised by the (from my point of view limited) extent to which the user is defended against "potentially unsafe dynamic content" by default. Two things were unexpected ...
279 views

### Efficient way of identifying the indices of first occurrences

It seems to me like identifying the first occurrence of unique elements should take about the same amount of time as it takes to delete duplicates. My data sets are much larger than this (...
206 views

### Mathematica: How to create a function that returns a property similar to how LinearModelFit works?

I'm trying to write a custom function in Mathematica, myFunc[x]. I want to be able to define properties of the function so that the user can call ...
76 views

### expression in an string

I want to create several directories "dir_i" in a mother directory "home". and put an specific file in each directory ...
147 views

### Equality and Quantifiers

I am new to Mathematica and to Math. I do not study math in English, so please bear with me as I try to state my questions.. This is what I am trying to "solve": $$∃!x : A(x) ⇔ ∃x : ¬A(x)$$ In ...
418 views

### DSolve 2nd Order Coupled Partial Differential Equations

I am trying to use Mathematica to solve 2 coupled differential equations. My equations are of the form \ddot{x}_i + A_{il} \partial^l A^{jk} ( \dot{x}_b \dot{x}_c - y_b y_c ) =0 ...
180 views

### Using Part within a Compiled Command

I'm looking to define a multi-line function that makes use of the "Part" command. A toy example: ...
204 views

### How to speed up the computation of a specific array

I am doing some calculations on superconductivity and I REALLY need to speed up the way I calculate one of my arrays. I will put the input to the matrix (of course a tiny toy model of what I am ...
334 views

### Numerical instability in cosh and sinh - integral functions [duplicate]

I'm trying to calculate the function: CoshIntegral[x] Sinh[x] - Cosh[x] SinhIntegral[x] Unfortunately Mathematica seems to hit a point (x~20) and things become ...
70 views

### Evaluate only one from a set of procedures

Let's say I've got a list of procedures: {Print[1];, Print[2];, Print[3];} And I want to only evaluate 3rd one: ...
559 views

### Creating new graphics primitive (EdgeForm, FaceForm)

My question is strongly related to this question, nevertheless I would like to bring it to every ones attention. Lets say I want to create a new graphics primitive ...
123 views

### Embedding hidden information in styled text

I would like to convert a collection of digitized documents to Mathematica notebooks. They are formatted as XML, divided into pages. The XML contains formatting I would like to preserve, but I do not ...
247 views

### Automatically compute r[1] = r1; r[2] = r2; …

I have three variables like this, r1 = 4; r2 = 3; r3 = 1; and I want to insert them into a function use them in a function definition like so: ...
359 views

### Graphics elements do not line up perfectly in exported PDFs

Graphics elements do not always line up perfectly in exported PDFs using "Save As..." method. Take, for example: ...
202 views

### Crank-Nicolson scheme for Schrodinger equation

I try to solve 1D Schrodinger equation with Crank-Nickolson methode. I use atomic units: time < 10^-14 => 413 a.u.t. length 30 * 10^-9 m => 567 Bohr radii ...
69 views

### Produce {f[x],g[y],h[z]} in as many ways as possible [duplicate]

I have two lists of equal lengths but for my task I will use 3-element lists , namely {x,y,z} and {f,g,h}. The first contains ...
58 views

### WindowMargins exact CurrentValue

Is there a way to force getting the numerical values of WindowMargins instead of Automatic for a window? For example let say I ...
574 views

### Problem with numerical evaluation of analytically solved integral, solution way off

The following command in Version 9.0.1: N[Integrate[x^50*Sin[x], {x, 0, 1}]] gives $1.4615\times 10^{48}$ which is way off from the correct solution which is ...
110 views

### NIntegrate with an arbitrary number of variables [duplicate]

I need to evaluate NIntegrate with a variable number of variables. Here's a concrete example. I'll accept an answer that finds a way to make the example work. I ...
84 views

### Failure message from Reduce

I am getting the message Reduce::nsmet: This system cannot be solved with the methods available to Reduce. while trying to solve the following equation: ...
715 views

### Discrete ColorData scheme with n colors?

I am trying to visualize a problem I am working on. For this, I need $n$ distinct colors which are preferably easy to distinguish. (Obviously, the higher the $n$ is, the harder it is to distinguish ...
197 views

### Why does not BarLegend accept user-defined color function?

I encountered a really strange problem with BarLegend. Say you have a user-defined color function: ...
54 views

### SyntaxInformation cannot reproduce syntax coloring of Block

Is there any way to have the same syntax coloring with SyntaxInformation that Block has? ...
885 views

### How to make Mathematica graphs in Microsoft Word independent from Mathematica?

When I open a .docx file containing Mathematica graphs on a computer without Mathematica software installed, the graphs look corrupted. For example, ...
133 views

### how to deal with so many digits in plot ticks [duplicate]

the data is as follows ...
142 views

### How to convert this answer into $\ln$ form?

I find the integral Integrate[Sqrt[2 x - x^2] + x^3 Log[(9 - x^2)/(9 + x^2)], {x, 0, 2}] and got ...
145 views

### Assigning an equation as a variable

I am compiling a calculator where many slider parameters are used to define a value, where the defined value may then be reused to define another value. I am unable able to, or at least been ...
166 views

### Documentation for user-defined functions; undocumented documentation feature?

I stumbled on some strange behaviour when trying out the new function template and documentation features, now purportedly working in v 9.0.1. I defined a function ...
354 views

### Drawing an arrow pointing at the “Enable Dynamics” button

Sometimes my students are given Mathematica notebooks as part of an assignment, and asked to go through some demonstrations contained in the .nb file. A lot of times I get complaints that the "graphs ...
385 views

### Detecting a collision in n-body simulation with NDSolve

Consider this three-body system: ...
264 views

### Calling Mathematica from Java

I'm trying to write a Java program that uses Mathematica code, but when I compile it, a window appears asking for MathLink. I enter ...
269 views

### Approximate minimum degree permutation algorithm in Mathematica

In MATLAB there is a nice implementation of the so called AMD (approximate minimum degree permutation) algorithm named amd (see Online MATLAB Documentation). There is an alternative algorithm called ...
167 views

### Time series (stochastic process) estimating parameters using characteristic function

I have a time series of assets ${A_1, A_2, ..., A_n}$, which is described by a sophisticated distribution having the following characteristic function: $\phi(u; t;\theta)$, where $\theta$ is a vector ...
115 views

### Showing AlgebraicNumber[1/2 (1 + Sqrt[5]), {-3, 2}] in human-readable way

Is there a function to show algebraic numbers in Mathematica more conveniently? I am looking for something similar to MatrixForm for matrices. For example, I would like to view ...
220 views

### ReplaceRepeated seemingly omits some rules

Is there a simple way in Mathematica to prevent rule reordering? Let me give an example: ...
167 views

### How to create a spliced survival statistical distribution?

I am trying to use Mathematica for more of my reliability engineering work and am having trouble using SplicedDistribution. I have a Weibull distribution (dist1) associated with a low stress ...
296 views

Update Using ...
116 views

### Using a variable to tell Mathematica which existing variable to manipulate

I have an estimation routine I have coded up, I want now to do some tests on it where I pick a particular parameter and run the estimation for differing values of that parameter. What I want is to be ...
1k views

### How to plot contours in the faces of a cube

I'm trying to plot contours of a function f[x,y,z] on the faces of a cube as the example below, which represents the domain of this function. Is there a way to do ...
361 views

### How can I draw a hyperboloid given its generatrix?

I want to see how a hyperboloid of revolution is generated by its generatrix, i.e. by rotating one (say the one passing point $(1,0,0)$ and $(0,1,1)$) of the skew lines around another (say the z ...
136 views

### Tooltip in Listplot - Export to PDF

I would like to export a listplot as a PDF document without loosing the tooltip information on the single points. It kind of works with hyperlinks. Nevertheless this workaround is pretty limited and ...