2
votes
1answer
45 views

recursively structuring a multivariate numerical optimization

Suppose that I want to partition the unit interval [0..1] into four subintervals whose max length is as short as possible. I can ask Mathematica to: ...
0
votes
0answers
33 views

Silly question about linear transformation [on hold]

I define a $3 \times 3$ matrix tran tran = 1/Sqrt[3] {{1, 1, 1}, {1, ζ, ζ^2}, {1, ζ^2, ζ}} Then to do the linear transformation, I use the following code ...
0
votes
0answers
46 views

How to find first quartile? [on hold]

I have this set: {131, 130, 130, 126, 125, 125, 123, 123, 121, 121}. I need to find some values, and one of these values is first quartile (...
0
votes
0answers
33 views

Unable to write to MM3000, stepper motor

Serial interface RS232 control I am using a stepper motor connected with RS232 protocol. But I am unable to write or read. I don't get any errors and I have waited after I open the device and then ...
6
votes
1answer
134 views

Constrain Locator to specified region

How can I constrain the locator to stay within the region defined by RegionPlot? When the Locator remains within the region, ...
2
votes
1answer
62 views

Does NDSolve iterate faster in a region where the system being solved is in equilibrium?

I was wondering how exactly the time it takes for NDSolve to iterate through a certain region of the domain depends on the local behaviour of the given system being solved. My guess would be the ...
12
votes
2answers
571 views

Is there any harm or benefit to Removing unneeded private symbols in packages?

One of the things I noticed is that in typical medium-to-large sized packages, a huge number of symbols are created in the myPackage`Private context. You can see a ...
0
votes
0answers
23 views

How to find the longest diagonal if you fold a piece of rectangular paper in half? [migrated]

An 8-inch by 12-inch paper napkin is folded in half three times with each fold resulting in a smaller rectangle. What is the longest possible diagonal for the final rectangle? Express your answers in ...
0
votes
1answer
69 views

Faster code for calculat in Integral include derivative

I saw this question How I can get faster I tried help that. But I can not understand. I want to write a faster code for: ...
0
votes
1answer
35 views

Sum over abstract value

My plan is to write a sum over an index. Currently I write Sum[f[OverTilde[q]], OverTilde[q] ∈ Subscript[l, i]] but Mathematica always tells me that "The ...
0
votes
0answers
16 views

How to stop the kernel between the two input dialog box? [on hold]

I have a code which you could see below and I want the kernel not to pass to the second dialog box until the first dialog box input is entered and hitting OK button. CreateDialog[ Grid[{{"Sonlu ...
3
votes
1answer
60 views

Duplicate rows with multiple entries

I have a huge dataset, which looks similar to this: ...
0
votes
1answer
48 views

CDF Player and CloudObject`Private` Problem

I'm trying to generate a simple Manipulate[] example showing Taylor expansion. However, the following code shows ...
3
votes
1answer
89 views

OptionsPattern[] taken as a Replacement Rule

I was trying to write my own plot function taking as unit size cm instead of points. I've tried ...
3
votes
1answer
32 views

Existence of edge in graph

I want to know whether an edge exist between two specific vertex? Is there any function like EdgeExist[g,{v1,v2}]?
0
votes
0answers
22 views

Hold assumption in Simplify [on hold]

If you type this into Mathematica, PrimeQ[x] It will return False. However, ...
4
votes
2answers
95 views

Good way to create a similarity / distance matrix for a large dataset

I have a large dataset with rows (100k+) for products and columns for features. Now I want to create a similarity matrix with NormalizedSquaredEuclideanDistance. ...
0
votes
1answer
33 views

Trying to solve ODE. Need help with error messages [on hold]

With this code I get an error-message: Equation or list of equations expected instead of True in the first argument. Apparently y'[0] == v0 gives ...
1
vote
1answer
53 views

Create a Dataset object, Association or SparesArray from a matrix [on hold]

I need to make queries and operations on a large dataset. What is the easiest way to add keys to matrix so that it is transformed to a dataset, which can later be used to make queries? Let's take ...
0
votes
0answers
31 views

Mathematica doesn't save my work [on hold]

When I save my work and close Mathematica, usually it's not saved, it won't save a my work,despite that it asks where to save the file. Sometimes it creates an empty notebook only.
0
votes
1answer
57 views

Why doesn't Mathematica solve this non linear (fractional) ODE? [on hold]

a1 = NDSolve[{y1''[x] - 0.1 y1[x]^0.25 == 0, y1'[0] == 0, y1[1] == 1}, I get the following errors - Power::infy: "Infinite expression 1/0.^0.75 encountered ...
1
vote
1answer
127 views

How can I evaluate a certain probability density function?

The PDF of a random variable $X$ is given by $$f_X(x)=\frac{2m^mx^{2m-1}}{\sqrt{\pi}\Gamma(m)}\sum_{i=1}^{N}W_iH(T_i)$$ with $$H(t)=\exp\left(-m\left(\sqrt{2}\lambda ...
8
votes
3answers
167 views

Archimedes' Scheme to find $\pi$

Given an Archimedes' scheme $$a_{n+1}=\frac{2a_nb_n}{a_n+b_n}$$ $$b_{n+1}=\sqrt{a_{n+1}b_n}$$ with initial values $a_0=2\sqrt{3},b_0=3.$ How do I prove using Mathematica that this converges to ...
2
votes
0answers
38 views

StringSplit acting weird on a String in StandardForm [on hold]

To begin, this is my first post on stack exchange, so if my question is not up to par please let me know so I can make the appropriate edits. Now for my question: why is it that parsing a string in ...
0
votes
0answers
62 views

Force NDSolve to use finite difference

How to force NDSolve to use finite difference instead of FEM. I have the following code: ...
0
votes
0answers
38 views

code indent issue in frontend: How to remove annoying space at beginning of a line

I am using MMA 10.4.1 Very often I encountered this problem This is an extraction of a Module (the last bracket is matching module). The ...
0
votes
1answer
36 views

min distance in a graph

How would I find the min distance between two vertices in a graph. What function should I use? For example, in the above, $d(2,4)=2$ and $d(2,3)=1$
0
votes
0answers
39 views

Value Iteration (Recursive iteration) to Minimize (Optimize) a Function

I have a function that I call as "Value". I am trying to find the minimum of this function and this function is a function of 4 other functions. One of these four functions is recursive based on the ...
0
votes
2answers
87 views

Find the minimum element of a row of a matrix and its column index for each row

I am trying to find the minimum value of a row of a matrix and its corresponding column. Please run the code below. OptV is the matrix that I would like to create which must give the output of the ...
2
votes
0answers
45 views

why do python modules load differently via mathematica? [duplicate]

its a steep learning curve trying to integrate mathematica with python's modules/library. I am using a Rapberry pi 3 with mathematica's wolfram command line. I know little about both platforms (so ...
1
vote
0answers
34 views

How to implement reusable graphic components having stable line thicknesses?

IMPORTANT: This post is a follow-up to Scaling edge thicknesses, and in particular to the accepted answer in that thread. Basically, I'm trying to use the idea given in that answer to implement ...
3
votes
1answer
73 views

Projection of a 3d curve to 2d

This question is related to: How to obtain the coordinates of the intersection line of two surfaces? Read the link first. First, I have tried ...
10
votes
1answer
126 views

RandomInteger: speed with long lists

I noticed an interesting effect with RandomInteger when looking at the time to create 10^8 random integers. The following code lines all take about 0.5 seconds on a ...
14
votes
3answers
312 views

Find duplicates in list of InfiniteLine

MMA 10 introduced a new function, which can be very convenient: InfiniteLine. Of course, two infinite lines can be described by different arguments: for example ...
1
vote
0answers
54 views

Mirror image of a point about a line [migrated]

How can I calculate the mirrored position for a point in 2D space? I know the xy-coordinates of the two points which define the vector. I also know the coordinates for the yellow point which I want to ...
0
votes
1answer
70 views

Nested Tables and List Plot

Take two matrices which depends on three parameters i1,i2 and i3 m1 = {{i1, 0, 0}, {0, i2, 0}, {0, 0, 0}} m2 = {{0, i1, 0}, {0, i2, 0}, {0, 0, i3}} I am using a ...
3
votes
1answer
112 views

Modeling chemical reactions: can Mathematica tell the end result of a reaction?

I am curious about using Mathematica for modelling chemical reactions but don't really know much about the Mathematica software yet. So I was reading this page at wolfram.com which explains some of ...
0
votes
0answers
34 views

Why here does Import[file] produce an error LinkOpen::linke:? [duplicate]

In the folder $BaseDirectory\\Kernel I have a file init.m, who calls a customized initialization package ...
0
votes
1answer
36 views

Using SystemDialogInput in a Manipulate expression

I want to add the select directory function in a user interface such as: ...
1
vote
1answer
140 views

How do you solve a linear equation of matrices? [duplicate]

The function Solve works fine for scalars: In[]:= Solve[A x - x B + C == 0, x] Out[]= {{x -> -(C/(A - B))}} When using matrices however, ...
0
votes
2answers
64 views

Applying a window over a list

The window functions state that they tread over lists, but when I try to do: HammingWindow/@list, I do not get the expected results. What is the best way to apply a window over an arbitrary length ...
2
votes
1answer
60 views

How to enlarge a specific part of a graph using Plot Command? [duplicate]

How to enlarge the closed curves of any Graph and Show them in a separate Graph within the ...
0
votes
0answers
45 views

Eigenelements of conductivity equation

I am trying to calculate the eigenvalues and eigenfunctions of the conductivity equation in an annulus. In particular I am looking for $(\lambda, u)$ s.t. $$ \begin{cases} \Delta u = \lambda u & ...
4
votes
2answers
68 views

Why is `FindCycle` crashing for this graph?

I'm working with a directed graph, previously mentioned in Exporting a high-resolution GraphPlot of a very large graph (65,536 nodes). It can be generated with the following code: ...
7
votes
1answer
152 views

Is it possible to get the (x, y) position of nodes in a `Graph`?

Given a graph... RandomGraph[{20,40}] ...is it possible to retrieve the (x, y) coordinates at which the nodes are drawn? ...
1
vote
1answer
106 views

Evaluate pure function through round brackets

In have some matrices of pure functions or numbers which I multiply by other matrices or vectors. I would like the functions to be evaluated in the result, but all that I get is something like this: ...
6
votes
3answers
218 views

What's wrong with naming a rule?

Please have a look at the code below. The second Manipulate uses the name rl of the replacement rule given in the first line, ...
1
vote
2answers
67 views

Recreating a ContourPlot3D using points

Let's define a three-dimensional surface ...
0
votes
0answers
26 views

PolynomialExtendedGCD in 2 variables

Consider a field $R$ and the ring $A=R[y]$. Consider two polynomials $g,h\in A[x]$. I want to obtain $d=\gcd(g,h)\in A[x]$ and two polynomials $s,t\in A[x]$ satisfying the Bézout relation: $sg+th=d$. ...
5
votes
1answer
97 views

FInding outliers in multiple dimensions

I'm working on dataset which isn't normally distributed.which contains three dimensions like cost, discount and profit I'm trying to find outliers in all these dimensions. I used z score to find ...

15 30 50 per page