All Questions

1 view

Seeking for method to speedup and get more flexable control Notebook History

When doing calculations in notebook, I modify the code a lot, and there are several versions of similar codes in the same notebook. But I found myself easily forgot which version is the newest, and I ...
38 views

Why won't DiscretizeRegion work with a custom distance function? [on hold]

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 ...
64 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. ...
127 views

Why am I getting different answers for an integral depending on method?

I'm trying to carry out an integral and I'm finding different answers depending on which method I choose to integrate with. I assume this has something to do with divergent pieces but I don't ...
23 views

Trouble solving system of nonlinear equations with piecewise

Here is my code so far ...
1k views

Behavior of ArcTan when two zeros are given as arguments

I've noticed that the numeric approximation of ArcTan is a bit different from the symbolic one. If I write ArcTan[0,0] I ...
97 views

Surface Plot 3D of a strongly concave shape

I have a list of {x,y,z} points that all lie on the surface of an object (model output from COMSOL). I would like to generate a graphics object that reproduces the surface. Ideally, I would like ...
35 views

Time needed to solve NIntegrate is much longer than what I was expecting

I'm trying to do the following list: tablevdip = ParallelTable[{x, y, Vdip[x, y, 6]}, {x, -1, 1, .5}, {y, -1, 1, .5}];] with ...
13 views

How to add two probability density function plot in mathematica

The mean and standard deviation of plot 1 is [.38404, .03867] and of plot 2 is [.38404, .542].
165 views

Using MovingMap to calculate percentage changes

MovingMap (new in version 10) applies a function to discrete data over a moving window. This is very convenient for calculating the percentage change of a series. ...
15 views

Kernel crash when evaluating NDSolveValue

I had a code that was working fine and I tried to add an extra few lines to find the solution of the same equation with different conditions. The original NDSolveValue solutions work fine but when it ...
65 views

How to plot fractals created with Newton's method

I'm quite a beginner using Mathematica. I'd like to plot the fractals of higher degree polynomials. I have an example for z^3 - 1 which looks like this: ...
23 views

How can I plot this Hurwitz Zeta-based function at negative arguments?

Here is the code: ...
81 views

What exactly is Implies? Is it a logical test?

I ran the following to simplify my logical test (expecting something in terms of And and Or ...) ...
55 views

Area of a image region

I've applied Mathematica to the problem of estimating the area of an estuary, but when I got the results I wasn't able to understand in which unit of area it was given. My approach is the following: ...
105 views

How can I plot an impulse series within a square wave?

I want to plot a repeated impulse of 1 millisecond (ms) within a signal of 61 Hz (16ms). My current code is: ...
58 views

how can i associate the headings of columns/rows with content of itself and then recall what i want after i've imported the excel file in mathematica

Hello, i make another try... I have to import a file like this below (it is an excel file, i show you just the beginnig. it should have thousend of rows and columns). After i've imported the file i ...
40 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 ...
14 views

Solving diffusion-like PDE for f(r,t)

I am trying to solve a partial differential equation like the following: where Sigma is mass density as a function of radial distance r and time t. I am expecting a diffusive behavior, and the ...
24 views

How to put 2 or 3 NeumannValue conditions?

I want to solve numerically the heat exchange of a fin in transient state and two-dimentional, here is my attempt but instead of put DirichletCondition on ...
56 views

Back from transfer function (s-domain) to differential equation (in t-domain)

I've got the following transfer function (in the s-domain): $$\text{H}(s)=\frac{\text{C}s}{\text{RC}s+1}$$ Is there a function in Mathematica 10 that I can go back to the differential equation (in ...
65 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 ...
163 views

DateDifference isn't consistent when giving result in years

This isn't really causing me a problem at the moment, but it's weird. Is this documented anywhere? When I ask for the difference in days and then in years between April 1, 2015 and October 1, 2015 ...
137 views

EasterSunday replacement in Mathematica 10

The Calendar package, now obsolete, had functionality for "special dates", in particular EasterSunday[]. The documentation says it's been subsumed into Wolfram ...
35 views

Evaluate Limit only if both directions(sides) are equal?Ex: $\lim _{x\to 0}\left(\frac{1}{x}\right)=DNE$

I want the limit of a function to only evaluate if both the left and right hand side are equal. For example $\lim _{x\to 0}\left(\frac{1}{x}\right)$ doesn't exist(two sided limit). However, the right ...
52 views

Finding scalar potential function [duplicate]

Consider the vector field defined by: $$\vec F(x,y)=\langle 2xy-\sin x,x^2+e^{3y}\rangle$$ We can check to see if the vector field is conservative with the following calculations: \begin{align*} ...
38 views

Error in Manipulate [on hold]

I am trying to create a button which will give random values for certain parameters. I am using the following in Manipulate[]. ...
33 views

Planning flights for a special route

I want to plan a world trip with Mathematica. So I already have the dataset with all the cities I want to visit and the tour (with the command FindShortestTour). So ...
222 views

Strange result from evaluating a Limit expression

Bug introduced in 9.0 and fixed in 10.0 When I evaluate the limit of (1-Cos[x]) Sin[1/x] at x = 0 in Mathematica 9, I ...
33 views

How to convert an uploaded image to a “dot-to-dot” puzzle?

I would like to upload an image to Mathematica and have the software place numbered points throughout the image so that it appears as a "dot-to-dot" image puzzle. I would also like to specify exactly ...
268 views

Exporting large numbers in WDX format

Bug introduced in 9.0 and fixed in 10.3 I have a list of 10 000 3×3 matrices in Mathematica. The entries are rational numbers. I would like to write this to a file so I can load it again in the ...
75 views

FullSimplify does freaky things with approximate Gaussians [duplicate]

I was playing around with Vitaliy Kaurov's neat answer to this question, and found something a bit unusual: ...
110 views

Problems with StateSpaceModel in v10.2

Bug introduced in 10.0.2 and fixed in 10.3 I don't know if this is a bug, or if just something changed I can't figure out. Take the following examples: ...
405 views

How to improve performance of BesselJ to the level of GSL?

Consider the following code: zs = N /@ Range[0, 12, 10^-5]; AbsoluteTiming[bessels = BesselJ[1, #] & /@ zs;] Length @ zs I've tried to measure only ...
463 views

Using Datasets in Mathematica 10.0

Bug introduced in 10.0 and fixed in 10.1 I am trying to use the Dataset functionality which was introduced in Mathematica 10.0 : ...
305 views

Magnifying Glass on a Plot

Although there is a trick in TEX magnifying glass but I want to know is there any function to magnifying glass on a plot with Mathematica? For example for a function as ...
1k views

Can mathematica solve this equation?

I have the following Mathematica code to solve an equation coming from isoparameteric finite element for quadratic tetrahedron element. I need to get the iteroplation fast and accurate. I only find ...
56 views

Why doesn't RandomChoice work here? [on hold]

I was using RandomChoice to run a simulation to test the probability that picking 4 marbles out of a bag containing 3 red and 7 blue marbles you get 2 red and 2 ...
15 views

Share variables among notebooks with different Kernels

So I have a server running in another notebook with a secondary kernel. I run my main notebook and launch the server notebook, but I have configured the variables in my main one, and can't find a way ...
72 views

Difference Colored legends from main plot

I am using the below code to create legends but I don't know why the colors in legends for various plots are different of devoted to main color of plots From ...
191 views

Wiggly and imprecise animated gif output

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

Axis break in Mathematica [duplicate]

I'm looking for a way to make a plot similar to the one I've sketched. So far all I've found is this discussion, which mostly uses Grid. I want the second part of ...
177 views

NIntegrate fails to converge under almost any PrecisionGoal, MinRecursion etc. How can I trust the result?

I have been getting some ideas by reading other related questions in the forum, but the integral I have to do is not converging in many cases. The integrand is of the form: ...
96 views

Why are so many built-in numerical function doesn't check its argument is packed array or not? [on hold]

This question is brought by this one. Outer[Times, RandomReal[1., 1000000], {1., 2.}]; is much slower than ...
33 views

Skipping sections of a notebook automatically

I have a notebook which allows to set some parameters at the start, and then does computations depending on these parameters. It is a long notebook and for readability it is broken up into sections ...
130 views

Plotting singular integral

I need to plot the following singular double integration $u(x,t)$ for $t=0, t=0.2, t=0.4, t=1$ and $t=2$ in one figure as a line. That is, I need $u$-coordinate vertically and $x$-coordinate ...
207 views

Understanding polyharmonic splines

Rahul Narain and J.M. gives implementation of the thin plate polyharmonic splines in this post. Rahul Narain's method is clear. J.M.'s is convenient to reuse. But J.M. used too many ...
2k views

When importing is it possible to set the delimiter?

When importing a csv file is there a way to set the delimiter. I have a csv that uses ";" as its delimiter. I tried ...
I'm calculating the probabilities of landing on each square in the game of monopoly and I ran into a few problems: I'm doing Markov matrices and I have no clue in how to make a $40 \times 40$ matrix ...