# All Questions

149 views

### Manipulations with options

I have two functions with options, for example f and g ...
85 views

### How do I find the analytical roots of this polynomial? [closed]

I want to find the analytical roots of this polynomial - x - a^3*x*(a^2*x*(a*x*(x - 1) + 1)*(x - 1) + 1)*(a*x*(x - 1) + 1)*(x - 1) ...
54 views

### Cross product of three vectors

I am following the answer of Jens from following post: How do I simplify a vector expression? vec /: Cross[vec[x_], HoldPattern[Cross[y__]]] := I want to create ...
44 views

### x and y axis nonlinear error fit possible? [duplicate]

I have a set of datapoints with x (position) errors as well as y (measurement) errors. Is there a way in Mathematica to fit a nonlinear function through this points, with weighting both, the x and y ...
96 views

### Plotting a finite series w.r.t. a parameter [closed]

So I would like to plot the series below: $$S_q = k \frac{1-\sum_{i=1}^{W}(1/W)^q}{1-q}$$ where $k$ is a constant which I assume for now to be equal to 1 and $q \in \mathbb{R}$. However, for my ...
107 views

### Problem with Volume [closed]

A bug probably. This should give the volume of the unit sphere: vol = Volume[{1. r, th, ph}, {r, 0, 1}, {th, 0, Pi}, {ph, -Pi, Pi}, "Spherical"] but it gives: ...
134 views

### How to count the number of the tube

There is a picture Get the binary image binimg = ColorSeparate[img][[2]] // Binarize[#, 0.25] & // Thinning Visulize the result of regconization ...
127 views

### Finding eigenvalues in Mathematica: why so slow?

I am trying to find the eigensystem of a large sparse real symmetric matrix, and I only need the lowest 40 or so eigenstates. The relevant code is as follows: ...
118 views

### How to integrate on bezier function?

I have: points = {{0, 100}, {250, 0}, {0, 300}, {500, 500}} And I want to know the area below the curve, so I came to: ...
49 views

### frequent slow evaluations for trivial expressions, large memory loaded

After loading a lot of data into memory and evaluating several hundred expressions without any problems, trivial expressions such as (1+2) take about 5-10 seconds to evaluate. Sometimes they are ...
40 views

### How to correctly use FormulaData

I am exploring some of the functions involving units and formulas, and wondered how to input quantities if the variable has a subscript. This works ...
55 views

### Angle between two vectors in spherical coordinates [closed]

I have two vectors: H = {1, 0, π/4}; EA = {1, 0, 0}; Which I want to be in {r, Phi, Theta} - which would should give an angle between the two vectors as ...
30 views

### How to import/export to libsvm?

Under the hood Mathematica uses libsvm, so I don't think this question is beyond the pale. I need to export an svm I trained with Classify to the standard SVM Format (which is readable by libsvm). ...
129 views

### How to find adjacent polygons of a specific polygon in a VoronoiMesh?

I have developed a code for VoronoiMesh. I am also able to find the polygon with highest number of adjacent polygons. How do I find the indices of the adjacent ...
41 views

### Get Isotope Data and Electron Mass in Same Units - kg and Kilograms

I'm trying to find the nuclear mass of $^{238}\text{U}$. To do this, I subtract the electron mass from the atomic mass. I'd like to find the final answer in kilograms. I'd also like to use ...
72 views

### Grayscale Morphology

How can I achieve grayscale morphological operations on 2D images in Mathematica. With morphology I mean operations like Dilation and Erosion. With grayscale I mean the operations that take images and ...
86 views

### How can I make this code to count Hamiltonian paths faster?

I have this very basic code to count Hamiltonian paths in a graph: ...
91 views

### working hours and negative time [closed]

I have a list of TimeObjects. I want to subtract 5h from each element and if TimeObject < 5h then give a negative hour. My ...
103 views

### Using two rules for the same variable

I am a newbie in the field so please not angry. I am reading the tutorial below and having a problem. Link: How to Create and Use Rules From the link: If you give two rules for the same ...
70 views

### Arrows from GraphicsComplex not converted to Normal form correctly

Bug introduced in 7.0 or earlier and persisting through 10.3.1 or later Show @ Graph[{1 -> 2, 2 -> 3}, Frame -> True] Normal @ % Is this a pure bug, ...
49 views

### Thickness of bars in a histogram

How can I control the thickness of the bars (here vertical lines) in a Histogram plot? For example in the plot below (of the corresponding image: ...
41 views

### Deciphering Coding Shortcuts [duplicate]

I'm having trouble deciphering why the following couple of expressions evaluate the way they do. #&@@ This returns the first value of a list. Why? Naïvely I ...
72 views

### Constructing an arbitrary dimensional matrix with a certain rule

I want to construct the following matrix $M$ of dimension $(N+1)\times(N+1)$ with the following rule (for arbitrary N). Below, in the subscript, as usual, the 1st index gives the row and the second ...
31 views

### Encoding/Decoding matrices as integers, integers as matrices [closed]

I want to convert large binary matrices of m x n dimensions into integers, and then to convert these integers to the original matrices. I attempted the following: ...
29 views

### DeleteDuplicate from a list with {x == y, y == x} -> {x == y}; [duplicate]

How can I tell Mathematica that it should delete equal elements from a list, which aren't in the same order. For example list={x == y, y == x} ; should become ...
38 views

### Interval arithmetic for DawsonF (or other special functions)

I am currently trying to estimate a complicated expression involving DawsonF using interval arithmetic. The interval arithmetic is partially supported by ...
33 views

### Formatting the prime factorization of expressions

I have a series expansion in $x$ and $a,b$ are constants which I want to type in $LaTeX$. But the numbers/integers are pretty large (have a lot of digits) so it becomes a bit messy in $LaTeX$. ...
35 views

### Exists[ ] statement inside RegionPlot[ ] too hard to resolve?

I've got a very complicated existential boolean expression, call it $\exists x: condition$, involving variables $p, q,$ and $x$. Is there a way to plot the region in which this statement holds ...
35 views

i am pretty new in Mathematica but upt to now i am nearly done with my first higher plot. I just want to use the whole range of my 7 z-values linked to the 7 colors in my defined blend for #3 (z) ...
21 views

### Rewriting List of Matrix Equation in Terms of Individual Equations? [duplicate]

I have a list of matrix equations M1={{a1,b1},{c1,d1}}; A1={{x1,y1},{z1,w1}}; M2={{a2,b2},{c2,d2}}; A2={{x2,y2},{z2,w2}}; sys={M1==A1,M2==A2}; which I would like ...
43 views

### What is the meaning of #, Root and & [duplicate]

I am new, but can any one tell me what is the meaning of formulas of x and y in the picture?
45 views

### Coordinates of the centers of the triangles composing a Koch snowflake [duplicate]

Let's suppose we have a Koch snowflake of arbitrary initial side length $a$, and a Cartesian coordinate system whose center coincide with the center of Koch snowflake, as shown in the figure. How ...
174 views

### Applying rules to expressions [closed]

I'm trying to write a rule that acts on any number, lists, expression and so on to turn any negative numbers positive. The simple r = n_ -> Abs[n] works ...
98 views

### Unexpected view of the Comsol result when I postprocess it in Mma

I simulated some nonlinear PDE using Comsol. Here one can find the results u=u(x,y) in the form of an Excel table with the terms ...
56 views

### Create an adequate 'training set' to train a ClassifierFunction which performs the role of the built-in SubsetQ

I am trying to "grow" my own SubsetQ function using Machine Learning methods. My cSubsetQ when given two lists (listA and ...
29 views

### NonlinearStateSpaceModel/OutputResponse gives doubled outputs

I want to simulate a pendulum or rather the controlled system. But NonlinearStateSpaceModel or the OutputResponse gives weird ...
61 views

### How to make a list (of data points) whose name is the same as the file name from which the data is imported [duplicate]

I have a set of files, e.g. file1.dat, file2.dat,... containing data (list of data points to plot, manipulate...) I want to do the following ...
427 views

### Generating Tuples with restrictions

I am interested in a certain subset of all tuples. Generating all with Tuples and then filtering is wasteful, and will "blow up" very quickly. For a concrete ...
51 views

### Convex and concave regions of a closed curve [duplicate]

A few days ago, in Mathematica's help, I saw a function for recognizing if a closed curve has a positive or negative radius (convex or concave) like in the picture I found on the web, but without the ...
63 views

### Monitoring a matrix with changeable elements as Manipulate in plotting [closed]

If we remember, Mathematica has an ability to show a Psudo-window of plots for monitoring the effects of some changeable parameters in the functions. For example ...
38 views

### 3D Interaction when using CDFDeploy

In the following code, the 3D plot of the manipulation is interactive. ...
29 views

### I want to plot the data which is based on Days vs Ph [duplicate]

I want to plot the data which is based on Days vs Ph
30 views

### Spacing control in export

While using, for example, the code ...
73 views

### Errro in plotting the results of FindRoot [on hold]

I would like to plot the results of FindRoot over certain range of one input. First of all I am sorry that the equation is a bit long and messy. I have tried to ...
56 views

### Abbreviated expressions in StringCases? [duplicate]

Am I missing something here? There's no support for abbreviated expressions in StringCases? StringMatchQ["MATCH", "*H"] (* ...
55 views

### Partition list into sublists of decreasing length [duplicate]

For example, I would like to partition {1,2,3,4,5} into {1} {1,2} {1,2,3} {1,2,3,4} {1,2,3,4,5} with just one line of code. ...
36 views

### Transform system of equations while leaving solution set invariant?

Consider the example system of equations syst==res where syst={x + 2 y + 3 x y, 1 + 4 x + y}; res={0 , 0}; Solving for the ...
85 views

### Draw Vectors in Spherical Shell and then Animate

I want to draw three vectors inside a spherical shell. One of the vectors will be moving, the others will be stationary. However, the animation is the next step. For now, I would like to get the ...