7
votes
1answer
63 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 ...
8
votes
3answers
260 views

Chebyshev Approximation

Is there functionality in Mathematica to expand a function into a series with Chebyshev polynomials? The Series function only approximates with Taylor series.
0
votes
0answers
40 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 ...
5
votes
1answer
45 views

Partial evaluation of symbols with non-inert OwnValues

Background: there are many, many questions here about the infamous ::setraw error. More often, than not, they have to do with repeated assignments to symbols. Here's the code: ...
1
vote
2answers
58 views

Barlegend with a different z span for ListDensityPlot

I would like to rescale the colors in a plot and to do this in the same way for the color bar. (So this enables me to have the color bar span a (z) range larger than than the data itself.) I got this ...
2
votes
1answer
14 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}]?
1
vote
1answer
14 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 ...
0
votes
0answers
11 views

CDF Player and CloudObject`Private` Problem

I'm trying to generate a simple Manipulate[] example showing Taylor expansion. However, the following code shows ...
8
votes
4answers
878 views

Interpolating data with a step

Suppose I have some data with a step in it: data = {{1, 1}, {2, 2}, {3, 3}, {3, 4}, {4, 5}, {5, 6}}; Interpolation will complain about this and not give you an ...
0
votes
0answers
14 views

Hold assumption in Simplify

If you type this into Mathematica, PrimeQ[x] It will return False. However, ...
1
vote
1answer
21 views

Create a Dataset object, Association or SparesArray from a matrix

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 ...
1
vote
1answer
28 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. ...
5
votes
3answers
105 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 ...
0
votes
1answer
22 views

Trying to solve ODE. Need help with error messages

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 ...
0
votes
1answer
32 views

Why doesn't Mathematica solve this non linear (fractional) ODE?

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
53 views

Deleting vertices from Graph and preserving Structure?

My goal is to remove vertices from graphs (and the edges from them) and then take GraphComplement to find out cut sets in graphs with sink and source such as here. So How can I delete vertices from a ...
2
votes
1answer
50 views

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

How to enlarge the closed curves of any Graph and Show them in a separate Graph within the ...
0
votes
1answer
58 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 ...
0
votes
1answer
31 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$
4
votes
1answer
453 views

Is there a method to send different Cell evaluation to different core?

I am running Mathematica on a computer with multi CPU and every CPU has multicore. I am wondering if there exist a method to send different cell evaluation to different core? So if I already have a ...
0
votes
0answers
38 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
18 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.
6
votes
3answers
188 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, ...
0
votes
0answers
28 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 ...
8
votes
3answers
154 views

Linear fit with conditional noise distribution

I need to fit a linear model of the form $y_i = a · x_i + b + e_i$. The $e_i$ are independent noise from a distribution that depends on $x$ as well as on global parameters of the data; however, the ...
2
votes
0answers
20 views

StringSplit acting weird on a String in StandardForm

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
2answers
53 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 ...
0
votes
1answer
33 views

Using SystemDialogInput in a Manipulate expression

I want to add the select directory function in a user interface such as: ...
0
votes
1answer
40 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. For instance, I have three functions: ...
18
votes
1answer
445 views

Numerical inverse Laplace-Hankel transform

When trying to reproduce the result of this paper about numerical solution of Lamb's problem, I encountered the following double integral (to be more precise, the 0-order inverse Hankel-Laplace ...
1
vote
0answers
32 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 ...
0
votes
1answer
59 views

Boundary conditions for NDSolve

I get the following message: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >> from ...
0
votes
0answers
22 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 ...
10
votes
3answers
153 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 ...
4
votes
1answer
93 views

Evaluating standard functions of general quaternions symbolically

Mathematica can easily compute exponentials and logarithms of concrete quaternions: ...
3
votes
1answer
80 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 ...
4
votes
1answer
76 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 ...
1
vote
1answer
51 views

Mirror image of a point about a line

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 ...
10
votes
3answers
3k views

Mapping a pure function with multiple slots [duplicate]

Here is a pure function with multiple slots: (#1^2 + #2^2)&[3, 4] 25 But how can I map that pure function over lists of values? For example, say I want ...
2
votes
0answers
30 views

why do python modules load differently via mathematica?

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 ...
2
votes
0answers
87 views

What is a good way to model fluid stream contours around airfoils?

I am an undergraduate student and am doing a project on conformal mapping for my complex analysis class. I have had one heck of a time trying to plot stream function contours to model fluid flow in ...
2
votes
1answer
52 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 ...
1
vote
1answer
45 views

Getting raw data using DcRaw

I'm using dcraw program to import raw image data to Mathematica. When I use Run["dcraw -4 -D -T "image.nef"] (which converts it to an unprocessed linear TIFF file) ...
1
vote
0answers
54 views

Creating package and encoding for CDF and Path for Mathematica

I am working on learning Enterprise CDF development. I developed a simple example. I am working with packages for I can encode my codes eventually. When I use Needs command and save the package in one ...
3
votes
3answers
114 views
1
vote
1answer
137 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, ...
1
vote
2answers
110 views

How to do a parametric histogram?

Is it possible to draw a spectral histogram from two random sets ? More specifically, I have these two random functions (fmin, ...
0
votes
0answers
37 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 & ...
-1
votes
1answer
46 views

CompiledFunction::cfsa Argument x at position1 should be a machine-size real number [on hold]

I have a compiled function: g:=Compile[{{x, _Real}},...] and call g through an interim function: g2[x_?NumericQ] = g[x] If ...
4
votes
1answer
47 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: ...

15 30 50 per page