# All Questions

23 views

### union several arrays of same flag(date for example) efficiently

Suppose I have several arrays from data files which look like: arrayi = {{datei1, xi11, xi21, ...}, {datei2, xi12, xi22, ...}, ..., {datein, xi1n, xi2n ,...}} ...
115 views

### How can I know if a pattern corresponds to a string pattern?

What would be the best way to detect if a pattern corresponds to a string pattern ? An invalid string pattern p would lead to an error in ...
25 views

### Attaching labels to the vertices of an Octahedron

How do you attach the labels (e1,e2,e3,e4,e5,e6) to all 6 vertices of the Octahedron below, ensuring that the labels of the first figure corresponds to the end ...
17 views

### How to delete InterpolationFunction created by NDSolve/ParametricNDSolve?

I have faced a uncommon problem. The situation is that I need use ParametricNDSolve/ParametricNDSolveValue to solve ODEs system in the non-linear model fitting process. So every iteration generating a ...
15 views

### Why won't ImplicitRegion work with a custom distance function?

I am trying (in 10.0) to create a region from a list of data points. I have created myDistance to use as the boolean test for whether or not a point should be included in the region ...
12 views

### Smooth Curve using Drawing Tools Palette

I am learning to use the drawing tools palette that comes packaged with Mathematica. I'm attempting to create some diagrams for class using Mathematica's drawing tools rather than Adobe. Is there ...
824 views

### Fitting piecewise functions

I have several large data sets which follow the following pattern: A position is measured, a force is applied until a new equilibrium is found. I'd like to find a fit for the position, at least at the ...
129 views

### Partial differential equation, Finite difference Method [on hold]

For my research project I am trying to solve following partial differential equation in Mathematica (V[r]*ψ[u, v])/4 + Derivative[1, 1][ψ][u, v] == 0 with ...
54 views

### Data fitted by two linear fits [duplicate]

can anybody help me please and tell me how to fit my set of points by two linear fits? It is always exactly two of them and are always linear and should cover all the data. The second line should ...
42 views

### How to solve 3rd ODE with this boundary conditions that is approaching infinity??I need to solve it numerically using Mathematica

Here are the code that I had tried but there is an error ...
69 views

### Wiggly and imprecise animated gif output

Trying to make animated gif of zooming into famous Ford circles. With the code ...
25 views

### String Question

Consider: listOfScores = Import["http://www.handsonstart.com/ExampleDataScores.txt", "Data"] Which gives this output: ...
35 views

### How to derive finite-difference scheme automatically on a quite general stencil

Info This question is a generalization of the following one Derivation of numerical scheme for linear transport equation on a variable stencil. Statement of a problem Linear scalar hyperbolic ...
223 views

### What does f_[whoCalled]^:=f really mean?

I came across the following post by John Doty in this Google Groups discussion: On Friday, January 11, 2013 8:23:16 PM UTC-7, amzoti wrote: It is clear the Mathematica uses Lisp as one ...
523 views

### Efficient way to utilise Parallel features to make use of many cores

Let's say I have 100 cores/kernels as my disposal and want to compute a function of two variables f[x,y] over {x,1,10}, ...
76 views

### Nesting BaseForm several functions deep causes dependent functions to not fully evaluate. Solutions?

Below is a simplified scenario of a problem that I'm running into. There are 3 functions each wrapped with BaseForm[] and a default base of 10 is passed to each ...
19 views

### Can I extract or deduce the effective input form to duplicate the results from an interactive toolbar?

The interactive toolbars that are available in 10.0+ are very nice for getting images to look the way I want; but the black box functionality is very un-Mathematica-like, and doesn't help me if I want ...
97 views

### Concise alternative to First@First@Position[…, 1,Heads->False]

Is there a more compact way to accomplish this: lst = {0,0,7}; idx = Position[lst, Except[0], 1, Heads -> False] // First // First (* => 3 *) For ...
34 views

### SubsetQ[] without ignoring duplicates

How could one create a code that checks whether a set is a subset of another, but not ignoring the duplicates? For example, $\{1,1,1\}$ would be a subset of $\{1,1,1,1\}$, but not vice versa. ...
76 views

### generating randomly oriented non-intersecting cylinders

I could not find anything relevant with "googling" (only this) I can create a set of randomly oriented cylinders (code found here) ...
74 views

### Align ColorBar (axislabel) to be parallel to the y-axis for any view-angle

The following code produces the 3D plot below (which is almost what I want). ...
28 views

### Labeling the vertices of a graph

I would like to label the vertices of a complete graph alphabetically. But I am stuck because I don't know how to associate only one vertex to a letter. ...
16 views

### Nestlist inside Compile

My question is a continuation of question1 and question2, but I think it may be considered as a self-contained one. I am interested to make the following code faster ...
94 views

### How to plot real roots of complex polynomials avoiding branch cuts?

Lets say I have the following matrix: M={{1,3+E^(I x),-1+2I x},{3+E^(-I x),2,E^(3I x)},{-1-2I x,E^(-3I x),-2}};  M=\begin{pmatrix} 1& 3+\mathrm e^{ix} ...
45 views

### Docked Cell that scrolls?

I use two finger movement on my trackpad for scrolling a notebook page up and down. Is it possible to make a docked cells that scrolls to the left and right using a two finger movement on the ...
51 views

### Mean squared displacement of a single trajectory

I have a single particle trajectory and would like to calculate the mean squared displacement. The particle is moving from blue over yellow, green to red data points. The {x,y} data are available ...
74 views

### Plotting singular integral

I need to plot the following singular double integration where $x>0$, $t=m=0.2$, and $f(y)= \exp(-(y-4.68)^2/0.4)$. Due to singularities, I cannot plot it. I checked the NIntegrate Integration ...
73 views

### Solving this system of nonlinear equations

Edit Interestingly, I realized solving my problem with $2n$ equations appeared to be more efficient than using mathematical results on the solutions to reduce the problem to $n$ equations (the $n$ ...
24 views

### Improving strategy to solve this constrained root-finding problem

I am looking for roots of the function eqs defined below. It has $2k$ unknowns and returns a vector of $2k-1$ components. ...
419 views

### A quicker than outer

I need to get a matrix $\{a(x_i-x_j)\}$, where $x_i$ form a partition of an interval, $a(x)$ is a given function. I use ...
200 views

### How to know the usage of undocumented function like LinearAlgebraBLAS? [on hold]

BLAS is not documented in mathematica. Using ?LinearAlgebraBLAS`* gives But None of the function has a detailed usage information Click any of the ...
14 views

### Tips on finessing Reduce[] with inequalities

Reduce[] sometimes solves inequalities I give it, sometimes it doesn't. Is there some general principles I'm missing or some common pitfalls I'm falling into? For example, here is easy problem I ...
48 views

### Rotate the output of Plot3D [on hold]

f[x_, y_] := Sin[x^2 + y^2] Exp[-x^2] + Cos[x^2 + y^2] g2 = Plot3D[f[x, y], {x, -2, 2}, {y, -2, 2}, PlotPoints -> 50, Axes -> False, Boxed -> False] ...
46 views

### distribution for a random variable [on hold]

In a lab with $2 n$ PCs, half of which operate with IP v4 and half with IP v6. A professor is interested in having all PCs with the same protocol open, so at first he starts opening each pc one by ...
35 views

### Displacement around the x axis, how to change a function location

While plotting a function I want to change the location of x. I am doing a regression with the logistic function ...
27 views

### Feeding results of NDSolve into a Do Loop and repeating

I'm solving a coupled ode-pde system, and my plan is as follows: Define inik[s] and inic[s] Using this, solve the ode system ...
34 views

### Plot3D PlotStyle V10.3 vs V7 [duplicate]

This is the from the the very good book of Hazrat He used Mathematica 7.0. In Mathematica 10.3 one gets ...
80 views

### Iterations in Mathematica

this is probably a very easy question for all of you. I have a stochastic Mathematica code (not important what it's exactly) which gives me a number at the end. Now I want Mathematica to run this ...
715 views

### Different colors when comparing Plot3D V9 and V10

I am trying to create Plot3D with same color as we used to get in V9 but without success. I used PlotTheme -> "Classic" in V10 but the results looks like somehow ...
22 views

### Solve involving simple cancellation on both sides fails when there are too many constants

I've been working with a number of equations of the form x = A * B * x ^ C where I need to solve for x--basically, equations ...
93 views

### Copy/Paste of a plot leaves whitespace

I'm trying to copy Mathematica figures into word, but when I do, I get tons of extra white-space for some reason. Either standard ctrl-c - ctrl-p or "copy graphic" does this. I understand that I ...
42 views

### Bifurcation Diagram of Chua Circuit

I am currently working on a Bifurcation Diagram for Chua's Circuit but I am having trouble coming up with code for a bifurcation of a system of equations. The following equations are given in the ...
289 views

### Integration of linked PDFs over probability simplex

I'm trying to integrate the following expression: f[a1,p1+p2+p3+p4]*f[a2,p2+p3+p4]*f[a3,p3+p4]*f[a4,p4] Where ...
338 views

Ten years ago I bought a book by Tom Wickham-Jones, Mathematica Graphics: Techniques and Applications. I read parts of it but then I forgot its existance. In recent years I read the nice book of ...
33 views

### Nonrectangular tensor encountered [on hold]

I am trying to solve a system of equations which characteristic matrix: ...
88 views

...
37 views

### High-order functions and interactive objects

I have been developing Mathematica code to interpret LaTeX code, extract formulas and apply various Mathematica operations (e.g. Simplify, ...
289 views

### How can I evaluate untrusted Mathematica code in a sandbox?

Is there any way to build a sandbox to evaluate untrusted Mathematica expressions in order to prevent them from having (malicious or accidental) harmful side effects? Context: I'm developing a system ...