# All Questions

102 views

### What is the 'Mathematica-way' to test a variable transform?

Hello Mathematica experts. I would like to play around with a simple variable transformation, to test some claims about it. I wonder if there is a Mathematica-like way to do this. The specific case ...
194 views

### Absolute value and argument of a complex expression

I would like to find the absolute value and the argument of the expression: $x + \sqrt { x^2 + y^2 }$ under the assumption that the absolute values of $x$ and $y$ are equal. I have written: ...
103 views

### Integrating a function forcing parameters to be real and positive

I'd like to integrate the function $f(x)=x^{a-1}e^{-b x}$ over the interval $[0,\infty)$. f[x_] := x^(a - 1)*Exp[-b*x] Then: ...
445 views

### Tracking iterations of a function

I'm learning MMA with Wagner's book. On page 41, he uses this to display the iterative steps of a FindRoot. However, I can't seem to replicate this (code at end), perhaps due to the difference in MMA ...
2k views

### Longest path in 0/1 matrix

I have a matrix of 0's and 1's forming a number of disjoint paths:   I would like to find the lengths of the paths, and from that "spectrum," the longest length (in the above example: 27, ...
318 views

### Map of all graphs obtainable with GraphData?

I've been trying to put together an answer to another question, but I am stuck, so I decided to post this question instead. Mathematica contains (among its curated data) information on definition, ...
71 views

879 views

### Calculating the area under a curve, but above a certain threshold value

so here I am with a time series of data (hours (t) and corresponding measurements (a)). ...
246 views

### How to improve visualisation of trajectories in 3D space

I have a list of trajectories from a bunch of photons that travel inside a scattering medium. Each trajectory is a list of $(x,y,z)$ pairs. I'd like to visualise them in 3D space. I came up with the ...
111 views

### Real and imaginary parts of a complex number

I would like to find the real and imaginary parts of $x + y$ in terms of polar coordinates. Here is code: ...
80 views

### FunctionInterpolation error when specifying AccuracyGoal

In the help page ref/message/FunctionInterpolation/ncvb, it is mentioned that one should specify AccuracyGoal for some (even ...
91 views

### Tooltips and points don't show when only 2 points in ListPlot?

Problem with ListPlot when each point has a Tooltip and there are exactly two points(or for a multi-plot ...
79 views

### How to map HoldForm?

I'm trying to compare between Sqrt[3.] and Sqrt[3]. To display the result, I mapped HoldForm to display the expressions on the left hand column (code at end), but it seems like Sqrt[3.] had been ...
227 views

### what is the best package/way to insert Mathematica code in latex docs?

I know that this question is not about strictly mathematica issue, but I think that in this site should be many pepople that use latex to distribute mathematica source code/examples. If the moderators ...
132 views

### Dynamically updating linked Manipulate variables

I am trying to write a simple cylindrical tank design notebook. Once the user inputs the desired capacity in gallons, it will compute the required volume (in cubic feet) and then offer sliders for ...
197 views

### Improving ListContourPlot mesh triangulation

I have a irregularly placed measurement data. I bring here a small example. I am sorry for that. mdata = {{20., 1.6, 0.218084}, {4.02807, 1.71068, 0.227565}, {19., 1.6, 0.240074}, {18.8333, ...
329 views

### Generating a list of standard normal random variables

Im trying to generate a list of random (standard) independent normal variables. For this, I first generate a random list of, say, 100 real numbers in the range [0, 1000], and then make them standard ...
144 views

### Inverse of a restriction of a non-invertible matrix

Let $A∈R^{4×4}$ be a non-invertible matrix, with $2$-dimensional kernel. How can I compute the inverse of the restriction of $A$ on a subspace where it is invertible: $A^{-1}v \,\,\,\,$ where ...
24 views

### How can I give input to an ArrayPlot [duplicate]

I would like to create a dynamic ArrayPlot so that the squares, when clicked, provide input. Can I use ArrayPlot for this? Or is there something else I should have to use.
155 views

### Is it possible to specify the direction of rotation in VectorAngle function?

If I use the function VectorAngle[{1,0},{1,-1}], is it possible to obtain the angle generated by rotating around the axis counter clock wise? In other words, I would move from the first vector to the ...
87 views

### Registering/detecting an importer by file name extension

I've developed an importer and exporter for FreeSurfer's MGH/MGZ file format; the specific format isn't important, but I was ...
178 views

### How can I obtain the complex root of an equation with FindRoot

I want to obtain the complex roots of some equations that are similar,but each of them has a different condition. this difference is the value of α in these ...
45 views

### Timing of ParallelDo versus Do: simple example [duplicate]

I'm trying to understand why a simple do-loop takes substantially longer when done in parallel than sequentially: ...
97 views

### Function pattern to support listed and non-listed arguments [duplicate]

I often want to write functions that take as an argument either a) a rule or b) a list of rules. As an example, when using Replace with just one rule, it does not ...
109 views

### ParallelEvaluate: Evaluation Rules and Increment

I'm trying to understand how ParallelEvaluate works, considering the two following snippets: ...
43 views

### Bar legend does not display values

My BarLegend shows only zeros instead of right values and I cannot find the reason. I set following minimum and maximum: ...
191 views

### How to generate a random binary tree with a given number of vertices and with a given shape, namely compact or elongated

I tried to generate a random binary tree with a Table of RandomInteger and to give a shape with a ...
84 views

### User defined output forms

I have a mathematica program which performs some manipulation which I then want to continue in another language, as I already have some code written in it. Syntactically this language is very similar ...
122 views

### how can tangent half angle substitution be done in Mathematica?

Is it possible to replace sine and cosine in terms of tangent half-angles and again the tangent half-angles by a variable say t?
138 views

### Collapsible Group of Control Objects

I did what I believe was a thorough search on this topic, but still ended up fruitless. Apologies if there is a trivial solution to this. Is there a way to group control objects together to form ...
106 views

### LiftingWaveletTransform with irregular grids

One of the properties mentioned in the literature about the lifting wavelet transform is that it can be applied on irregular meshes or grids (i.e. not equally spaced samples); but I don't seem to see ...
429 views

### Visualization: elliptical insights into data sets…

I was recently reading the following paper on visualization techniques using ellipses to gain statistical insights. Elliptical visualization for looking at correlations has briefly been touched on ...
129 views

### multiple sequential definitions, defining own set function

I want to define a function for doing multiple definitions, where I apply the same function f to all values, and definitions are done not at the same time but after ...
190 views

### Solving a system of equations using matrix form

Please bear with me as I am a beginner at Mathematica. In the following system, all variables on the right hand side are known, except for w1, ...
254 views

### BoxWhiskerChart without whiskers

I would like a chart showing the median, 1/4, 3/4 quartiles, without the whiskers or fences. how can I achieve this? I cannot figure out how to turn off both the whiskers and the fences in the result ...
167 views

### Plotting: DensityPlot produces artifacts

I am trying to plot the electric potentials of bouncing balls using the following code: ...
219 views

### How to find a particular solution using NDSolve

I'm looking for a way to find a specific solution to a differential equation. As a simplified version of my problem, here's a similar setup for a simple harmonic oscillator problem. ...
84 views

### Finding integral bounds

i have this integral shown below is equal to 1, and i need to find "a" on mathematica, but I'm not sure how. integral (from 0 to a) sqrt((-50.8938 sin(8.4823 t))^2+(4-11.3097 sin(11.3097 t))^2) dt = ...
145 views

### Smarter way of manipulating plot style?

Say, I have a colorlist listColor={Black,Brown,Red,Cyan} Now, I have some Plot function that I can use this list: ...
151 views

### NIntegrate: Catastrophic loss of precision

Below is a simplified code that I am trying to evaluate. I am basically getting the rms value of a Wakefield function. When I finally try to evaluate the rms, I get an error. Any help would be greatly ...
59 views

### Showing Steps of Calculations [duplicate]

I'm solving a a differential equation in Mathematica and was wondering how to show the steps, like how Wolfram|Alpha does it, in the program. Any ideas?
290 views

### What is wrong about Abs[x]-a? Is it a bug?

Why is the Out[74] not {1 - a, {x -> -1}}? ...
553 views

### Find all roots in the interval of nonlinear equation

I am struggling on how to find all the roots of 1+1/2^x+1/3^x==0 which lie in a given of real and imaginary interval. Solve ...
82 views

### Timing Differences

In More efficient implementation for comparing coefficient lists in a Do-loop link, george2079 posts in his first answer a piece of code that takes 352 seconds to compute. When I run this same piece ...